Guest User

Untitled

a guest
Feb 17th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. double payCalc(double P,double yir, double y)
  2.  
  3. {
  4. double mir, a, b, c, d, e, f, Payment;
  5. mir = yir/1200;
  6. a = 1+mir;
  7. b = 1/a;`?`enter code here`
  8. c = 12*y;
  9. d = pow(b,c);
  10. e = 1-d;
  11. f = P*mir;":?
  12. return Payment;
  13. }
  14.  
  15. int main ()
  16. {
  17. cout<<fixed<<setprecision(2); //setting
  18. double P, yir, y;
  19. cin>>P>>yir>>y;
  20. double payCalc(P, yir, y);
  21. cout<<"Principal: "<<P<<" Interest Rate: "<<yir<<" Years: "<<y<<
  22. " Payment: "<<payCalc<<endl;
  23. }
Add Comment
Please, Sign In to add comment