Answer to Question #220285 in C++ for Turflot

Question #220285

You are requested by a store opens the entire week) Store comprises of two sections namely the Your in Soshanguve to calculate it SuperStore (Spar) and determine the day with the highest Food section C++ program anagement for the should prompt the total sales for each section for each day [27 ] ’ s earning for the week and lowest earning s (the .  The a nd the Liquor store . and store the total sales for the day into an array.  At the end of the week It should display a report for M total highest sales were sales for that week, t recorded.


1
Expert's answer
2021-07-25T08:37:06-0400
#include <bits/stdc++.h>
using namespace std;

int largest(int arr[], int n)
{
        int i;
        int max = arr[0];
        for (i = 1; i < n; i++)
                if (arr[i] > max)
                        max = arr[i];

        return i;
}


int main()
{
        int arr[5]; //suppose there are 5 items in store
    cout<<"Enter the sales of 5 items:";
    for(int i=;i<5;i++)
    { cin>>arr[i];}
        cout << "Largest sales is for item"<< largest(arr, n) + 1;
        return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS