"Write a program that allows the user to enter seven double values representing store sales for each day of one week. After all seven values are entered, echo them to the screen, and display highest and lowest sales values."
I got this so far (it only displays the seven values):
#include<iostream.h>
#include<conio.h>
using namespace std;
int main()
{
const int SZ = 7;
double sales[SZ];
int x;
for(x = 0; x < SZ; ++x)
{
cout<<"Enter sales for day "<<(x + 1)<<" >> ";
cin>>sales[x];
}
cout<<"The entered sales are: ";
for(x = 0; x< SZ; ++x)
cout<<sales[x]<<" ";
getch();
}
Thanks.

New Topic/Question
Reply




MultiQuote




|