SHARE
TWEET

Untitled

a guest Sep 16th, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top