SergeyKlimov » 02 янв 2018, 00:46
import java.util.Scanner;
public class Rantie {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int deposit = sc.nextInt();
int i = 1;
System.out.println("Your start deposit is: " + deposit);
System.out.print("Your deposit after: ");
do {
deposit *= 1.12;
if (i > 1)
System.out.printf("\n - %d years is: %d", i, deposit);
else
System.out.printf("\n - 1 year is: %d", deposit);
i++;
} while (i <= 20);
}
}
import java.util.Scanner;
public class Rantie {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int deposit = sc.nextInt();
int i = 1;
System.out.println("Your start deposit is: " + deposit);
System.out.print("Your deposit after: ");
do {
deposit *= 1.12;
if (i > 1)
System.out.printf("\n - %d years is: %d", i, deposit);
else
System.out.printf("\n - 1 year is: %d", deposit);
i++;
} while (i <= 20);
}
}