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
The first time you save a document, which screen appears
Molodets [167]
Your answer is b. save as screen
3 0
3 years ago
Read 2 more answers
Automotive engine cylinder heads can be made of what?
pantera1 [17]

Answer:

automotive engine cylinder heads can be made of cast iron or aluminum

6 0
3 years ago
Attribute variables have the same meaning as participants variables. is this true or false?​
zysi [14]

Answer:

true

Explanation:

because I said so dude

5 0
3 years ago
Information technology has powerful effects on social behavior. Which of the following issues should NOT be expected when intera
AfilCa [17]

Increased inhibitions and a decreased likelihood that all members will contribute to the discussion is the following issues should NOT be expected when interacting with teammates via information technology

b. Increased inhibitions and a decreased likelihood that all members will contribute to the discussion.

<u>Explanation:</u>

In information technology, social behaviour will effect more powerful in industries. In digital medial those use mobile everybody is a media person, easily share the important to social media and sharing person doesn’t aware of the effect of sharing the information.

If a piece of information is received or send both the sender and receiver should be aware of the importance of information make sure it should not be shared outside the group members or the world.

Once import information shared outside the world it can stop any given point time.

6 0
3 years ago
Wirte a program which asks the users to input length and calculates the area of a square.( Area = Length^2)​
kogti [31]

Explanation:

i hope this will help you

3 0
2 years ago
Other questions:
  • Hub is used in Twisted pair Ethernet. True/False
    6·1 answer
  • Define the missing function. licenseNum is created as: (100000 * customID) + licenseYear. Sample output:
    10·2 answers
  • Which of the following should you always wear to avoid being thrown from a vehicle and then crushed if it tips over?
    12·2 answers
  • The part of the computer that contains the brain, or central processing unit, is also known as the A. monitor. B. keyboard. C. m
    13·2 answers
  • Having a conversation with someone using a cellular phone is an example of _________ transmission. simplex full-duplex half-dupl
    11·1 answer
  • Imported data that maintains a refreshable link to its external source is called ____ data.
    7·1 answer
  • Where can you find your EFC
    8·2 answers
  • I need urgent help. which of these network has minimum data loss. a. LAN b. MAN c. WAN ​
    11·1 answer
  • I really need help in this!!!
    11·1 answer
  • Why are pirated software considered a threat?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!