Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. public class Main
  2. {
  3. public static void main(String[] args)
  4. {
  5. Scanner scan = new Scanner(System.in);
  6. system.out.println("Enter P,r,n,t:");
  7. int P = scan.nextInt();
  8. int r = scan.nextInt();
  9. int n = scan.nextInt();
  10. int t = scan.nextInt();
  11. int a;
  12. int a = P*(Math.pow((1 + r / 100), t));
  13. System.out.printf("A = $ %.2f", a);
  14.  
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement