Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class DepositCalculator {
- public static void main(String[] args) {
- Scanner scanner = new Scanner (System.in);
- double DepositSum = Double.parseDouble(scanner.nextLine());
- int timeDeposit = Integer.parseInt(scanner.nextLine());
- double interestPeryear = Double.parseDouble(scanner.nextLine());
- double Mont = DepositSum * interestPeryear / 100 / 12;
- double Total = DepositSum + timeDeposit * Mont;
- System.out.printf("%.2f", Total);
- }
- }
Add Comment
Please, Sign In to add comment