Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main ()
- {
- float principal,erate,crate,intrest,ctime,etime;
- cout << "Please enter the amount of Principal: ";
- cin >> principal;
- cout << "Please enter the annual intrest rate: ";
- cin >> erate;
- crate = erate / 100;
- cout << "Please enter how many years taken to pay back loan: ";
- cin >> etime;
- ctime = etime * 12;
- intrest = principal * crate * ctime;
- cout << "Principal: " << principal << "\n";
- "Make this a currency with two decimal places";
- cout << "Annual Intrest Rate: " << crate << "\n";
- "Make this a percentage with two decimal places";
- cout << "Number of months: " << ctime << "\n";
- cout << "Intrest Earned: " << intrest;
- "Make this a currency with two decimal places";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement