0
I have two questions with this code:
void main{ int counter = 0; int registeredStudents [10]; while (counter < 10) { cout << "Student #" << counter + 1 << ":\n"; cin >> registeredStudents [counter]; counter++; } } 1. It won't let me use void for the main function. 2. The program allows me to give the first input for the array, but then just prints "Student #2:", "Student #3", etc. without letting me give more input. Thanks if you can give some answers!
2 ответов
+ 2
1. for C++, must be
int main(){
return 0;
}
2. if you are using SoloLearn, input all input at separate lines before the app sends your codes back to their server for compilation.
In computer, with IDE, the flow will be correct.
Learn at computer with IDE.
0
Gordon I was using a raspberry pi