Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double payCalc(double P,double yir, double y)
- {
- double mir, a, b, c, d, e, f, Payment;
- mir = yir/1200;
- a = 1+mir;
- b = 1/a;`?`enter code here`
- c = 12*y;
- d = pow(b,c);
- e = 1-d;
- f = P*mir;":?
- return Payment;
- }
- int main ()
- {
- cout<<fixed<<setprecision(2); //setting
- double P, yir, y;
- cin>>P>>yir>>y;
- double payCalc(P, yir, y);
- cout<<"Principal: "<<P<<" Interest Rate: "<<yir<<" Years: "<<y<<
- " Payment: "<<payCalc<<endl;
- }
Add Comment
Please, Sign In to add comment