7. A. Design an application for the homestead furniture store that gets sales tr
ID: 3549718 • Letter: 7
Question
7. A. Design an application for the homestead furniture store that gets sales transaction data including an account number customer name and purchase price. Output the account number and name then output the customers payment each month for the next 12 months. Assume that there is no finance charge that the customer makes no new purchases and that the customer pays off the balance with equal monthly payments.
B. Modify the Homestead Furniture Store application so it executes continuously for any number of customers until a sentinel value is supplied for the account number.
Explanation / Answer
#include<iostream>
using namespace std;
int main()
{
int acctNum;
string firstName;
string lastName;
int purchasePrice;
int payment;
cout <<"Please enter account number: ";
cin >> acctNum;
cout << endl;
cout << "Please enter customer's first name: ";
cin >> firstName;
cout << endl;
cout << "Please enter customer's last name: ";
cin >> lastName;
cout << endl;
cout <<"Please enter purchase price: ";
cin >> purchasePrice;
cout << endl;
payment = purchasePrice / 12;
cout << "Customer First Name: " << firstName << endl;
cout << "Customer Last Name: " << lastName << endl;
cout << "Account Number: " << acctNum << endl;
for(int count = 1; count<=12; count++)
cout << "Payment Number " << count << ": $" << payment << endl;
return 0;
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.