+ 1
Why does it crash ?
#include <iostream> using namespace std; int main () int var (a = 0; a < 50; a+=10) { cout << a << endl; } int x[2][3] = { {2, 3, 4}, // 1st row {8, 9, 10} // 2nd row };break /* Outputs 0 10 20 30 40 *
5 odpowiedzi
+ 9
I think this is how it should be:
#include <iostream>
using namespace std;
int main(){
for(int a=0; a<50; a+=10){
cout << a << endl;
}
return 0;
}
This code produces the expected output.
0
the { after main is missing and the closing } of main is missing
0
thx :')
0
did it work?
0
yes but if you wabt to practice with array the original code is good only missing {}