0

Okay here's what I'm trying to do use a for loop get 5 numbers from input ONE number at a time. Output the sum and average of the 5 numbers.

I am only allowed to use a maximum of 2 variables to solve this problem. Heres my code so far, please help me to find error? it compiles but doesnt compute

```
#include <iostream>
using namespace std;
int main()
{
int startNum;
int nextNum;
cout<<"Please Input a number " <<endl;
cin >> startNum;
for(startNum=0; startNum + nextNum<=5; nextNum++)
{
cout<< startNum+nextNum+nextNum+nextNum+nextNum<< " is the sum of all numbers " <<endl;
cout<<endl;
cout<< startNum+nextNum+nextNum+nextNum+nextNum/5 << "is the avg of your numbers " <<endl;
}
return 0;
}
```

*Edited 6 Years Ago by cortez716*: n/a