0
how to solve project 2 in java Q2 is U take a loan from a friend and need to calculate how much u will owe him after 3 months.
2 Answers
0
Hi! Please, show us your code attempt! Thx!
0
import java.util.Scanner;
public class Program
{
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int amount = scanner.nextInt();
int i= 1;
while(i<=3){
amount = amount -((amount*10)/100);
++i;
}
System.out.println(amount );
}
}