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];
}
The cell reference is B22
plz thank me, it keeps me motivated to answer more of your questions :)
Answer: Precondition
Explanation: Precondition statement is the statement that has the condition for the particular program that has to be correct or true before the execution otherwise the condition can result as undefined. This statement checks that there is no error in the statement before the function gets called. Similarly post condition is for the checking of the statement after being executed.
Answer:
Maybe computer engineering and marketing skills