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
.true or false? one disadvantage of cloudware is that it is never free<br> A. true<br> B. false
ser-zykov [4K]

Answer:

true

Explanation:

cloudware is used for many reasons and It is sometimes too much of an expense to the company

7 0
2 years ago
What is the purpose of memory address?​
IceJOKER [234]

Answer:

A memory address is a unique identifier used by a device or CPU for data tracking.

5 0
1 year ago
Read 2 more answers
Which of the following occurs during data cleansing?
Diano4ka-milaya [45]

Answer:c)Clean redundant customer data

Explanation:Data cleansing/cleaning is the activity for the elimination of the data which is not required for further use, corrupt, unnecessary etc by detecting it. The data that is being cleared is categorized by levels like irrelevant  data, incorrect data, inaccurate data, redundant data etc.

The data is eliminated by the method of correcting , modifying, reducing unnecessary parts,deleting, etc.Thus, the correct option is option(C).

5 0
3 years ago
AYYOOOO CAN YOU HELP A GIRL OUUTT???
goblinko [34]

Answer: The answer is true

8 0
2 years ago
Ally typed a business letters she most likely used a
Zarrin [17]

Answer:

Ally typed a business letters she most likely used a  <u>Word Processor</u>.

Explanation:

Word processors are the tools that are used to process the text in terms of formatting, printing and editing the text document. These programs or software are used to write the text document with ease.

Microsoft word and word perfect are the examples of the word processors.

We can write the text on note pad as well, but we cannot apply different fonts style, size and formatting techniques on that application. Word processors provide a lot of fonts styles and formatting options to make the document appealing.

6 0
3 years ago
Other questions:
  • For some people , alcohol can cause an uncontrollable blank of the eyes , making good vision almost impossible
    5·1 answer
  • TRUE OR FALSE, databases allow you to search for content on the internet based on certain criteria (PLS ANSWER RIGHT)
    10·2 answers
  • What is looping in QBASIC​
    9·1 answer
  • Part cost Calculator Modify the GUI in your program to look like the following GUI. To do that you need to add the following to
    13·1 answer
  • What does resolution mean on a computer monitor?
    9·2 answers
  • When a chart is selected, numerous customization options can be found on which Chart Tools tabs?
    11·2 answers
  • Write the code for invoking a method named sendsignal. there are no arguments for this method . assume that sendsignal is define
    12·1 answer
  • . When a function template has two parameterized types, one as the return value, and one as an argument, then _____.
    11·1 answer
  • What do computer programs generally try to solve and how? A) Computer programs generally try to solve a well-defined problem usi
    14·1 answer
  • Samantha is part of a project management team working on the initiation phase of a project. What is her team expected to do in t
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!