Ahoj, prikladam kod kalkulacky pujcky, kde by se melo z vlozene castky kazdy mesic zaplatit 10% a kazdy mesic by se ukazalo, kolik zbyva doplatit. Postaci vytvorit 3cykly / platby za 3 mesice. Dekuji za pomoc
import java.util.Scanner;
public class Program
{
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int amount = scanner.nextInt();
//your code goes here
int paid;
int rest;
int x = 0;
while(x < 3){ //3 cykly - jde o platby za 3 mesice
paid = amount * 10 / 100 ;//vypocet 10% z pujcky -inputu
rest = amount - paid; // vypocet zbyle castky po odectu 10% od inputu
x++;
}
}
}