Advertisement
Spocoman

03. Deposit Calculator

Aug 19th, 2024
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class DepositCalculator {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         double money = Double.parseDouble(scanner.nextLine());
  7.         double months = Double.parseDouble(scanner.nextLine());
  8.         double percent = Double.parseDouble(scanner.nextLine());
  9.      
  10.         double monthPercent = money * percent / 1200;
  11.         double total = money + months * monthPercent;
  12.        
  13.         System.out.println(total);
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement