0

What is the mistake. I did all the things but error coming.

include <iostream> using namespace std; int main() { int a = 0; do { cout << a << endl; a++; } while(a < 11); return 0; { int a = 1; do { cout << a << endl; a++; } while(a < 11); return 0; }

30th Oct 2016, 6:36 AM
yuvraj
yuvraj - avatar
4 odpowiedzi
+ 1
add an } after the return statement.
30th Oct 2016, 7:01 AM
Mohammed Zameeruddin
Mohammed Zameeruddin - avatar
0
Check your curly braces matching. You have 4 opening ('{') and just 3 closing ('}').
30th Oct 2016, 6:46 AM
Daniel Oravec
Daniel Oravec - avatar
0
You have to add extra } after the code. Also the code after return 0 is unreachable.
30th Oct 2016, 6:52 AM
Eng. Jehad Ahmad Ghanim
Eng. Jehad Ahmad Ghanim - avatar
0
thanks
30th Oct 2016, 6:58 AM
yuvraj
yuvraj - avatar