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
What is the purpose and what are some of the components of a wide area network connection?
Ilia_Sergeevich [38]

Answer:

WAN(wide area network) is the network that is used for the connection in the geographical areas on large scale.They are used for connecting the areas like cities, countries, states etc.The connection of various LANs(Local area network) and MAN(Metropolitan area network) form the WAN.

There are several components that are used in the wide area network structure. Some of the constituents are as follows:-

  • ATM()Asynchronous transfer mode
  • Fiber optic communication path
  • Modem having cables
  • Frame relay
  • Dial up internet etc.

5 0
3 years ago
Read 2 more answers
What is the importance of human flourishing to science and technology?​
nadya68 [22]

Explanation:

:*):*):*)*)*:)*:)*:*)*:**:*)*:)*:)*:*):*)*P:)*:*):*)

:*

):*

)*:

)*:*

):*):*)*:*):*)*:*):*):*):)*:*):*):*):*)

:*):*)

6 0
3 years ago
Why can’t web apps send notifications to a device’s taskbar when the app is closed?
tangare [24]
Web apps can't send notifications when it's closed because it is not installed into the device as a software program, meaning it doesn't have enough access to do so. Plus you are closing it down so how is something that you close down supposed to work?
8 0
4 years ago
Write the code for invoking a static method named sendTwo, provided by the DataTransmitter class. There are two arguments for th
MAVERICK [17]

Answer:

DataTransmitter.sendTwo(15.955, 13);

Explanation:

The code above will call the method sendTwo() which exists inside the class DataTransmitter

Because this a static method it can be invoked with only the dot operator without making an object of the DatTransmitter class with the new Operator

Since the method sendTwo () accepts two parameters of type double and int respectively, the values 5.955, 13 are passed as argument during the method call.

5 0
3 years ago
How can e-group help in collaborating online​
tresset_1 [31]

Answer:

Collaborative learning is an e-learning approach where students are able to socially interact with other students, as well as instructors. ... Collaborative learning is based upon the principle that students can enrich their learning experiences by interacting with others and benefiting from one another's strengths.

Explanation:

inclusion of collaborative activities in an online course leads to positive student performance outcomes. Collaborative group interactions facilitate active learning, shared knowledge, and promote social interaction and a supportive eLearning community

4 0
3 years ago
Other questions:
  • Rebecca completed work on a computer and is verifying the functionality of the system when she finds a new problem. This problem
    13·1 answer
  • Which document lists the planned dates for performing tasks and meeting goals identified in the project plan?
    15·1 answer
  • Write a single c statement to read an integer from the keyboard and assign it variable "num"
    6·1 answer
  • Write a function named intro that takes a string as input.
    12·1 answer
  • ] why was drone-defense equipment deployed at airports in the United Kingdom?
    13·1 answer
  • Witch of the following is a malicious program that can replicate and spread from computer to computer?
    13·1 answer
  • Which guideline would not promote energy conservation?
    15·1 answer
  • Input an int greater than 0 and print every multiple of 5 between it and 0 inclusive in descending order. If the number is not g
    13·1 answer
  • Characteristics of 1st generation​ computers
    5·1 answer
  • after landing, you are tying down the aircraft when a person approaches and asks: "faa. are you the pilot of this aircraft?" wha
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!