Advertisement
AngelKejov

Untitled

Oct 30th, 2021
988
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class KUR {
  4.  
  5.     public static void main(String[] args) {
  6.         Scanner sc = new Scanner(System.in);
  7.  
  8.         double depositSum = Double.parseDouble(sc.nextLine());
  9.         int srok = Integer.parseInt(sc.nextLine());
  10.         double procent = Double.parseDouble(sc.nextLine());
  11.  
  12.         double stackedInterest = (depositSum*(procent/100.0f));
  13.         double interestForOneMoth = stackedInterest / 12;
  14.         double totalSum = depositSum + srok * interestForOneMoth;
  15.  
  16.         System.out.println(totalSum);
  17.     }
  18. }
  19.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement