EDIT: I have tried type casting, but I believe you somehow can't go from a double to an int, but instead only the other way is possible. Added a few more variables which I was missing.

Say that you owe the credit card company $1000.00. The company charges you 1.5% per month on the unpaid balance. You have decided to stop using the card and to pay off the debt by making a monthly payment of N dollars a month. Write a program that asks for the monthy payment, then writes out the balance and total payments so far for every succeeding month until the balance is zero or less.

For each month, calculate the interest due on the unpaid balance. Then calculate the new balance by adding the interest and subtracting the payment.

In this program, I am trying to add 1.5% to the initial value which is named as LEFT. Since, in Java the % function is used for modular division, that is not possible. Do you know of any other way to do this?

If the output should be a double then why not declare balance and nbalance as a double?
and why not declare left as a double too?

and if you want left to be int then just convert it double then

Haha, thanks! that fixed the issue of converting...but still leaves adding a percentage a mystery. Are you aware of how to add a percentage to a number? For instance, adding 1.5% to $1000 (In Java of course).

Isn't that a loop? I made that loop so that it can keep running that line and accumulating both month and day. Accumulating month by 1 and pay by 100. Basically, while the variable nbalance is greater than or equal to 1, it should keep printing. I want the program to end when there's no more money left to owe.

whoops sorry missed that... should have noted that you are using a break ... to stop the loop
instead you should have the previous operations on the loop that will deduct the money(to make nbalance less than 1)

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...