Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that produces a sales report for a salsa maker who markets 5 typ

ID: 3778924 • Letter: W

Question

Write a program that produces a sales report for a salsa maker who markets 5 types of salsa ("mild ", "medium", "sweet ", "hot ", "zesty "). The program includes total sales for all products and identifies the highest and lowest selling product (Assuming each jar is $4). It generates a report: Name Jars Sold _______________________ Mild 10 Medium 20 . . . At the end of this report it will show below items: Total sales: High Seller: Low Seller: Two parallel arrays are used to store the salsa names (Mild, Medium, etc.) and quantities sold of each (prompt user).
Using c++ Write a program that produces a sales report for a salsa maker who markets 5 types of salsa ("mild ", "medium", "sweet ", "hot ", "zesty "). The program includes total sales for all products and identifies the highest and lowest selling product (Assuming each jar is $4). It generates a report: Name Jars Sold _______________________ Mild 10 Medium 20 . . . At the end of this report it will show below items: Total sales: High Seller: Low Seller: Two parallel arrays are used to store the salsa names (Mild, Medium, etc.) and quantities sold of each (prompt user).
Using c++
Using c++

Explanation / Answer

#include <iostream>
#include <string>
using namespace std;

int main()
{
   string a[]={"mild", "medium", "sweet", "hot", "zesty"};

   int b[5];
   for(int i=0;i<5;i++)
   {
       cout<<"Enter the number of jars sold for "<<a[i]<<" salsa:";
       cin>>b[i];
   }
   int max=0;
   int min=0;
   cout<<"Name Jars Sold"<<endl;
   for(int i=0;i<5;i++)
   {
       if(b[max]<b[i])
       {
           max=i;
       }
       if(b[min]>b[i])
       {
           min=i;
       }
       cout<<a[i]<<' '<<b[i]<<endl;
   }
   cout<<"High Seller: "<<a[max]<<" "<<b[max]<<endl;
   cout<<"Low Seller: "<<a[min]<<" "<<b[min]<<endl;

   return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote