Server IP : 172.16.15.8 / Your IP : 3.145.8.139 Web Server : Apache System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.2.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0705) : /home/jhoyler/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
//--------------------------------------------------------------------- // Programming Assignment #1 // // Written by Joe Oyler // September 10 2008 // // Purpose: To compute the monthly payment of an installment loan // and the balance remaining after half of the installments // have been made. Also to compute the total amount of // interest paid over the life of the loan. //--------------------------------------------------------------------- // Preprocessor Section #include <iostream> #include <iomanip> using namespace std; // Main Function int main () { // Variables and Constants int loanamt, // loan amount in dollars anintrt, // annual interest rate as a decimal nummnpy; // number of monthly paymnets float monpay, // monthly payment balhalf, // balance halfway through total; // total interest paid // Input Phase cout << "Welcome to the Loan Analysis Program!" << endl; cout << " Enter loan amount: "; cin >> loanamt; cout << " Enter annual interest rate (as a decimal): "; cin >> anintrt; cout << " Enter number of monthly payments: "; cin >> nummnpy; // Processing Phase monpay = return 0; }