Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class KUR {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- double depositSum = Double.parseDouble(sc.nextLine());
- int srok = Integer.parseInt(sc.nextLine());
- double procent = Double.parseDouble(sc.nextLine());
- double stackedInterest = (depositSum*(procent/100.0f));
- double interestForOneMoth = stackedInterest / 12;
- double totalSum = depositSum + srok * interestForOneMoth;
- System.out.println(totalSum);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement