The spread a smile greeting card store maintains customer records with data fiel
ID: 3633664 • Letter: T
Question
The spread a smile greeting card store maintains customer records with data fields for first name, last name, address, and total purchases in dollars. At the end of each month, the store manager invited the five customers with the greatest value of purchases to an exclusive sale event. Develop the logic for a program that reads 100 customers records and stores the first and last names and total purchases in three parallel arrays. Then sort the arrays so that the records are in descending order by purchase amount of the month. The output lists the names of the top five customers.Explanation / Answer
Dear, Pseudo code Start Declarations const int numOfCust=100 const int month=30 num count=0 string fName[ numOfCust] string lName[ numOfCust] num totalPurchases[ numOfCust] readRecords() SortDescending() DisplayFirstFiveRecords() Stop readRecords() while customer not eof input firstName,lastName,total from customer.dat fName[i] =firstName lName[i]=lastName total[i]=totalPurchase[i] i++ return SortDescending() While xRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.