1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
MrMuchimi
3 years ago
8

Write a program that lets a maker of chips and salsa keep track of their sales for five different types of salsa they produce: mi

ld, medium, sweet, hot, and zesty. It should use two parallel five-element arrays: an array of strings that holds the five salsa names and an array of integers that holds the number of jars sold during the past month for each salsa type. The salsa names should be stored using an initialization list at the time the name array is created. The program should prompt the user to enter the number of jars sold for each type. Once this sales data has been entered, the program should produce a report that displays sales for each salsa type, total sales, and the names of the highest selling and lowest selling products.
Computers and Technology
1 answer:
natali 33 [55]3 years ago
5 0

Answer:

Using C++ to solve the problem as given below

Explanation:

#include<iostream>

#include<string.h>

using namespace std;

int main()

{

string salsa_name[5]={"mild","medium","sweet","hot","zesty"};

int jar_sale[5]={0,0,0,0,0};

int i;

int total=0;

int high=0;

int high_index=0;

int low=0;

int low_index=0;

int temp=0;

for(i=0;i<5;i++)

{

while(temp<=0)

{

cout<<"enter the number of jars sold for "<<salsa_name[i]<<" ";

cin>>temp;

if(temp<=0)

cout<<"invalid data. please try again\n";

}

jar_sale[i]=temp;

temp=0;

}

cout<<"name\t jars sold\n";

cout<<"\n---------------------------\n";

for(i=0;i<5;i++)

{

cout<<" "<<salsa_name[i]<<"\t\t"<<jar_sale[i]<<"\n";

}

low=jar_sale[0];

for(i=0;i<5;i++)

{

total=total+jar_sale[i];

if(jar_sale[i] >= high)

{

high_index=i;

high=jar_sale[i];

}

if(jar_sale[i]<=low)

{

low_index=i;

low=jar_sale[i];

}

}

cout<<"\n total sale : "<<total;

cout<<"\n high seller : "<<salsa_name[high_index];

cout<<"\n low seller : "<<salsa_name[low_index];

}

You might be interested in
Isa wants to find out if his co-worker Alexis is available for an event on Wednesday, February 10th. Which calendar
Elena-2011 [213]
Appoint view
Hope this helps
7 0
3 years ago
Mr. Andrews, the lead programmer for the game New Horizons, hires independent testers to check the game for stability and perfor
NikAS [45]
I think “D”, did I help?
5 0
2 years ago
Read 2 more answers
Question 5 of 10
Drupady [299]
The programs you need for you are not even done yet
3 0
1 year ago
The it components of an erp system architecture include the hardware, software and the ________
natta225 [31]

The components of an ERP system architecture is made up of the hardware, software and the Data.

<h3>What is an ERP system?</h3>

Enterprise resource planning (ERP) is known to be a kind of  software that firms often use to handle or manage day-to-day business works such as accounting and others.

Note that The components of an ERP system architecture is made up of the hardware, software and the Data.

Learn more about  ERP system from

brainly.com/question/14635097

#SPJ12

6 0
2 years ago
Montoya Consumer Products Inc is implementing Service Cloud. They typically handle 50,000 customer inquiries per day. What shoul
maksim [4K]

Answer:

Option A is correct

Explanation:

It would help in building the right architecture and configuration that would decrease those operations times by a large magnitude like uploading or updating large number of records.

8 0
3 years ago
Other questions:
  • 3. Of the following pieces of information in a document, for which would you most likely insert a mail merge field? A. First nam
    13·2 answers
  • Name three types of data stored on a computer’s hard disk
    11·1 answer
  • What does the rule of five say?
    12·2 answers
  • Light travels at 3 × 108 meters per second. A light-year is the distance a light beam travels in one year.Write a PYTHON program
    14·1 answer
  • How does emotional awareness help you with non-verbal communication?
    13·2 answers
  • Need help !!!!!!!!!!!!!!!
    7·1 answer
  • Hardware refers to programs and protocols used on a computer system.<br><br> True<br> False
    8·2 answers
  • Database accessibility DBA writes subschema to decide the accessibility of database.
    13·2 answers
  • What happens when the electrons flowing through the light bulb change direction?
    11·1 answer
  • Which action does not happen in each iteration of the repeat loop in the
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!