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
How do you think weather can affect sailing?<br><br>What would be good sailing weather?​
N76 [4]

Answer:

Weather can affect sailing because if its raining it can sink it also if theres a storm. Good weather that would be good to sail in is if its a little windy because if its just sunny and not windy it wont move. ps you can copy it if u want idc

6 0
3 years ago
When parking ur vehicle facing downhill with a curb, you should point ur front wheels?
Genrish500 [490]
Wheels should be pointing towards the curb. this is in case your vehicle rolls, if it does, the wheel will hit the curb and stop the car, it will also prevent the car from going into the road and incoming traffic. vice versa when parking uphill, point wheels away from curb, that is also to prevent the car from rolling to incoming traffic.
6 0
3 years ago
Read 2 more answers
If you have two tasks x and y, with y being a successor to x, if we mark x as undone (because it needs to be redone for some rea
Ierofanga [76]

Answer:

idk

Explanation:

sorry

7 0
2 years ago
The logical view Select one: a. shows how data are organized and structured on the storage media. b. presents an entry screen to
Nana76 [90]

Answer:

The answer is "Option d'.

Explanation:

The database provides a single graphical view of the data, but it  provides the facility to use logical view concept, that uses by view command, that uses the dataset to provide a logical view, that shows data according to user condition, and certain options were incorrect which can be described as follows:

  • In option a, In logical viewing data, it is not used.
  • In option b, It doesn't represent entry screen it simply shows detail.
  • In option c, this command doesn't allow you to create duplicate data.
4 0
3 years ago
What are five don’ts of using a computer
Sonja [21]

Answer:

well, as long as there are no right or wrong answers, don't:

look to closely at the screen, as it may mess up your eyes

hold a drink above the computer, as it may spill and cause "sticky keys"

go to sites that you know will give your a computer a virus, cause they cost hundreds of dollars to repair, and some aren't able to come out

go on illegal sites/do illegal operations to the computer itself, because then you won't have a computer

Explanation:

3 0
3 years ago
Read 2 more answers
Other questions:
  • You have a Bluetooth headset that integrates with your computer so that you can talk to partners through Microsoft Lync. This is
    6·2 answers
  • Websites that are designed to adapt gracefully to any screen size use a technique called
    5·1 answer
  • Hi Im really a girl and i want to know how to change my username without having to make a new account?
    9·2 answers
  • 1. JAVA Create one method to do the following expressions. Given the following declarations, what is the result of each of the e
    13·1 answer
  • Microsoft ________ is a cloud storage and file sharing service
    12·1 answer
  • Which shot is not the best for a widescreen image
    11·2 answers
  • 14. Which of the following is NOT a
    6·2 answers
  • PLZ HELP ASAP
    13·1 answer
  • Why are computers better than humans at solving a problem like finding the shortest route between ten different cities?
    15·2 answers
  • A network device that is used to connect multiple devices together without segmenting a network is a __________.
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!