Advertisement
Guest User

Untitled

a guest
Jul 29th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. #include <iostream>
  2.  
  3.  
  4. using namespace std;
  5.  
  6. int main ()
  7. {
  8.  
  9. float principal,erate,crate,intrest,ctime,etime;
  10. cout << "Please enter the amount of Principal: ";
  11. cin >> principal;
  12. cout << "Please enter the annual intrest rate: ";
  13. cin >> erate;
  14. crate = erate / 100;
  15. cout << "Please enter how many years taken to pay back loan: ";
  16. cin >> etime;
  17. ctime = etime * 12;
  18. intrest = principal * crate * ctime;
  19. cout << "Principal: " << principal << "\n";
  20.  
  21. "Make this a currency with two decimal places";
  22.  
  23. cout << "Annual Intrest Rate: " << crate << "\n";
  24.  
  25. "Make this a percentage with two decimal places";
  26.  
  27. cout << "Number of months: " << ctime << "\n";
  28.  
  29. cout << "Intrest Earned: " << intrest;
  30.  
  31. "Make this a currency with two decimal places";
  32.  
  33. return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement