Interest Rate Solver in Text File in C++

Email
 Submitted on: 9/26/2016 12:16:55 AM By: Jake R. Pomperada Level: Beginner User Rating: By 1 Users Compatibility: C++ (general) Views: 2908

A simple program that I wrote a long time ago in C++ that will compute the interest rate of the amount being loaned and then save the results in a text file. Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com.

code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
 ``` //************************************** // Name: Interest Rate Solver in Text File in C++ // Description:A simple program that I wrote a long time ago in C++ that will compute the interest rate of the amount being loaned and then save the results in a text file. Add me at Facebook my address is jakerpomperada@gmail.com and jakerpomperada@yahoo.com. // By: Jake R. Pomperada //************************************** #include #include #include using namespace std; main() { string name; int principal=0; int number_months=0; float rate=0.00,solve_rate=0.00; ofstream file("report.txt"); cout << "\t Kwarta Agad Lending Investor"; cout << "\n\n"; cout << "Enter Customer Name:=> "; getline(cin,name); cout << "\nEnter Amount Loan:=> "; cin >> principal; cout << "\nNumber of Months:=> "; cin >> number_months; cout << "\nEnter Rate Per Month :=> "; cin >> rate; solve_rate = (principal * number_months * rate ) ; cout << "\n\n"; cout << fixed << setprecision(2); cout << "The Simple Interest Rate is Php " << solve_rate << "."; file << "\n\t ======= Kwarta Agad Lending Investor ========="; file << "\n\n"; file << "\n\t\t CUSTOMER REPORT"; file << "\n\n"; file << "\n Customer Name : " << name; file << "\n AmountLoan : " << principal; file << "\n Number of Months : " << number_months; file << "\n Rate Per Month: " << rate; file << "\n\n"; file << fixed << setprecision(2); file << "\n Interest Rate is Php " << solve_rate; file.close(); cout << "\n\n"; system("pause"); }```

Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Beginner category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)

Other User Comments

There are no comments on this submission.

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)

To post feedback, first please login.