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
C:\windows\system32\drivers\etc\protocol is an example of a file ________. select one:
monitta

I guess the correct option is letter D.

C:\windows\system32\drivers\etc\protocol is an example of a file path.

5 0
3 years ago
Fair use allows individuals to break copyright so long as they ________.
Iteru [2.4K]
Can prove they are not infringing on copyright
4 0
3 years ago
Please discuss what you consider to be some of the biggest challenges your company will face when working from the Linux command
Nastasia [14]

Answer:

Command remembering issues.

Explanation:

The biggest challenge my company will face when working on Linux is remembering issues of the commands. The commands in Linux are a bit difficult to remember as they are complicated bit but practice can solve this issue. "Practice makes a man perfect" this well known saying suggests that practice can make perfect and this well known saying also works with Linux the more practice the employees do the more perfect they get.

3 0
3 years ago
Which of the following tasks would least help an individual achieve a goal to safely lose weight?
ozzi
To continue to look at motivational or inspirational quotes to remind them or to remember how far you have come and it is not time to give up!
7 0
3 years ago
Read 2 more answers
Where are some places that cyberbullying occurs? check all that apply
antiseptic1488 [7]

Answer:

social media like  snap chat twitter  and face book .it can even happen over email.or in school chats.

Explanation:

5 0
3 years ago
Read 2 more answers
Other questions:
  • Which wildcat character will return a single character when using the find dialog box
    14·1 answer
  • The condition, ____, entered in the criteria row of a long text field in a query window would retrieve all records where the lon
    8·1 answer
  • How can you find Web pages that contain news published during the past week?
    8·1 answer
  • Olivia creates a personal budget. She enters her current savings account balance in cell D3. In cell A3, she calculates her inco
    8·1 answer
  • Drag each label to the correct image.
    9·2 answers
  • The memory unit of a computer has 2M Words of 32 bits (or 4 bytes) each. The computer has an instruction format with 4 fields: a
    14·1 answer
  • What should be done with statements or sections which are unclear?
    12·2 answers
  • What is the output of the following program?
    10·1 answer
  • Set methods are also commonly called _____ methods, and get methods are also commonly called _____ methods.
    6·1 answer
  • Which tab should a user click to access the Page Borders feature of Word?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!