Hey all this is the problem i am currently stuck on; in fact my whole class doesn't get it...
Write a C++ program with a loop that asks user to enter a series of integers in the range of [-100 100]. If user enters a number out of that range, your program shouldn’t consider it, and should ask for a new number. The user should enter 0
to stop the loop. When the loop stops, your program must display:
• the largest TWO numbers entered in the range of [-100 100],
• the smallest TWO numbers entered in the range of [-100 100],
• the average of negative numbers entered in the range of [-100 100],
• the average of positive numbers entered in the range of [-100 100].
int max1, max2, min1, min2,
int poscount, negcount;
double sumpos, sumneg, avgpos, avgneg;
while (num1= 0)
{int max1, max2, min1, min2
int poscount, negcount;
double sumpos, sumneg, avgpos, avgneg;
cin >> num;
while {(num < -100) || num > 100);}
cout << "Enter number again\n"
cin >> num;}
This is what i have am i anywhere near right i know i have some errors but can anyone help me solve this!!!!!!