Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using any teminal console and C++ A supermarket wants to reward its best customer of each day, showing the customers name on a screen in

Using any teminal console and C++

A supermarket wants to reward its best customer of each day, showing the customers name on a screen in the supermarket. For that purpose, the customers purchase amount is stored in a vector and the customers name is stored in a corresponding vector.

Implement a function

string name_of_best_customer(vector sales, vector customers) 

that returns the name of the customer with the largest sale.

Write a program that prompts the cashier to enter all prices and names, adds them to two vectors, calls the function that you implemented, and displays the result. Use a price of 0 as a sentinel.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Technology And Management Computers And Information Processing Systems For Business

Authors: Robert C. Goldstein

1st Edition

0471887374, 978-0471887379

More Books

Students also viewed these Databases questions

Question

4. Describe the role of narratives in constructing history.

Answered: 1 week ago

Question

1. Identify six different types of history.

Answered: 1 week ago