0
I don't know why it always gets wrong, can someone help me?
3 Antworten
+ 4
You should always put your codes in main
int main() {
int myArr[5];
for(int x=0; x<5; x++) {
myArr[x] = 42;
cout << x << ":" << myArr[x] << endl;
}
return 0;
}
0
NurAnisa Hidayatul Masruroh
Or you can create a method, write code in that method and call that method in main method.
https://code.sololearn.com/ch6144Ls0Yty/?ref=app
0
Thank you all for the answers