Your objective is to write a program that calculates the simple interest for a given loan amount and
duration (in years).
Formula:
Simple interest = loan amount X interest rate X number of years
Assume interest rate is a constant 6% per year.
Specifically, your program will:
1. Output descriptive header
2. Prompt and read any customer’s first name, middle initial, and last name individually
3. Prompt and read the principal/loan amount
4. Prompt and read the duration of the loan in years
5. Calculate the interest
6. Output:
a. Customer full name
b. Principal/loan amount
c. Duration of loan
d. Interest rate
e. Interest on loan
f. Principal and interest due at end of term
Ok i am stuck on how to use the simple interest formula how to declare it? its very confusing, i dont know where to begin with here is my program so far.
int main(){
system("color f0");
string firstName;
string middleInitial;
string lastName;
float p;
float r;
float t;
float si;
cout<<"Please enter your First Name: ";
cin>>firstName;
cout<<"Please enter your Middle Initial: ";
cin>>middleInitial;
cout<<"Please enter your Last Name: ";
cin>>lastName;
cout<<"You entered "<<firstName<<" "<<middleInitial<<" "<<lastName<<endl;
cout<<"Please enter Loan Amount: ";
cin>>p;
cout<<"You entered "<<p<<endl;
cout<<"Please enter Loan Duration: ";
cin>>t;
cout<<"You entered "<<t<<endl;
si=(p*r*t)/100;
system("Pause");
return 0;
}// end of main