Advertisement
AngelKejov

Untitled

Oct 30th, 2021
914
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement