Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main
- {
- public static void main(String[] args)
- {
- Scanner scan = new Scanner(System.in);
- system.out.println("Enter P,r,n,t:");
- int P = scan.nextInt();
- int r = scan.nextInt();
- int n = scan.nextInt();
- int t = scan.nextInt();
- int a;
- int a = P*(Math.pow((1 + r / 100), t));
- System.out.printf("A = $ %.2f", a);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement