0
Creating Loops
Need Help With this Project: You take a loan from a friend and need to calculate how much you will owe him after 3 months. You are going to pay him back 10% of the remaining loan amount each month. Create a program that takes the loan amount as input, calculates and outputs the remaining amount after 3 months.
4 Respuestas
+ 7
Onica Victory ,
there is no hint about the programming language you are going to use. please update your post by putting the required information in a tag.
+ 3
Hi! Please, show us your try.
+ 1
Lothar this is task "credit calculator" 19 lesson course of Java
0
This is in java. I keep on getting an error for my multiplication attempt, but I'm not sure why
import java.util.Scanner;
public class Program
{
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int amount = scanner.nextInt();
int month = 1;
double interest = 0.10;
int payment = interest * amount;
int owe = amount = payment;
while (3 <= month) {owe = amount - payment; month++;
}
System.out.println(payment);
}
}.