I am trying to do this C++ homework, my
second one, i am very new to this and have no
idea what is going on i would appreciate any
help. thank you. below is the homework
problem and what i have so far. i know that i
need to create a loop for prompting the user to
enter a random number and the program is
suppose to prompt the user until -999 is
entered at that point the program will compute
the sum, count, average, smallest and largest
number entered values.
So far i have this:
int main()
{
// Identifying Variables
int sum, count, average,
smallestnumber, largestnumber;
int x=0;
while(x!=-999);
x++;
cout <<" enter a number (-999 to quit)";
cin >> x;
return 0;
}
but this is just returning a never ending loop of
enter a number(-999 to quit) without prompting
the user to input any value.