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
I need a free flashdrive can anyone tell me any website links so i can get one for free????​
olga55 [171]

Answer:

wish

Explanation:

look for one that is free

4 0
3 years ago
When Mark completed his research paper, he decided that he wanted to have all headings to be in bold, underlined, and 14 points.
MatroZZZ [7]

CTRL/CMD + B (BOLD)

CTRL/CMD + U (Underline)

CTRL/CMD + ] or [ (change font size)

6 0
3 years ago
List and describe three options in the autocad object snap toolbar
miv72 [106K]
<span>END POINT : Snaps to the closest endpoint or corner of a geometric object. MID POINT : Snaps to the midpoint of a geometric object. CENTER : Snaps to the center of an arc, circle, ellipse, or elliptical arc.</span>
6 0
3 years ago
A project manager is responsible for (check all that apply)
Klio2033 [76]
When I answered this it was C
3 0
3 years ago
Explain how to implement two stacks in one array A[1..n] in such a way that neither stack overflows unless the total number elem
algol [13]

Answer:

Check explanation

Explanation:

Two stacks can make use of one array by utilizing various stack pointers that begins from different ends of an array. Looking at the array A[1...n], the first stack will drive elements that starts from position 1 as well as to move its' pointer to n.

The Second stack will begin at the n position and motion its' pointer to 1. The best likely divide is to offer each stack a half of an array. whenever any of two stacks transverse the half-point, an overflow can happen but for that overall number of elements, it must be n

5 0
3 years ago
Other questions:
  • Playstation network live updates pes 2018 does it cost extra
    13·1 answer
  • Most large organizations store data through a strategy called a(n) ________ to promote efficient and safe use of data across the
    11·1 answer
  • The most fundamental components of storage that users interact with are the:
    11·1 answer
  • List 5 anti-virus products currently in use
    15·1 answer
  • I'm looking for a new laptop for school. Which laptop would be the best. Right now I have a chromebook and it is broken. 
    12·2 answers
  • Write a function ngrams(n, tokens) that produces a list of all n-grams of the specified size from the input token list. Each n-g
    6·1 answer
  • Which statement about the subject line is true? The subject line can be found just below the message box. The subject line is ma
    13·2 answers
  • 9. Themes can be modified using variants. *<br><br>True<br>False​
    7·2 answers
  • In the year, , the American Department of Defense put a military research network, called ARPANET online.
    5·1 answer
  • Paragraph on uses of computer 100 words plss​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!