Why is nothing displayed when I launch the program? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Why is nothing displayed when I launch the program?

(i'm a noob) #include <iostream> using namespace std; int main ( ) { int chiffre = 1; while ( chiffre < 10 ); { cout << "Rentrez un chiffre plus grand que 10"; cin >> chiffre; } cout << chiffre << " est plus grand que 10 " << endl; } Thanks for the help :)

13th Aug 2018, 9:20 AM
Louis
7 Answers
+ 3
Louis just remove semicolon after while statement.. semicolon terminates whatever is there in while loop. additionally, you should end your main function with return 0;
13th Aug 2018, 9:25 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
+ 5
Never use semicolon next to functions defination conditional statements loops..... Hope this helps☺️☺️.
13th Aug 2018, 9:43 AM
Meet Mehta
Meet Mehta - avatar
+ 3
Yes that's the only case where we need to use ; . Hope you got it☺️☺️.
13th Aug 2018, 9:54 AM
Meet Mehta
Meet Mehta - avatar
+ 2
I confused with the do/while loop were we use a semicolon after the while(...) wich is in the end of the loop (sorry for my bad english)
13th Aug 2018, 9:50 AM
Louis
+ 2
:)
13th Aug 2018, 9:57 AM
Meet Mehta
Meet Mehta - avatar
0
Thanks you <<3
13th Aug 2018, 9:26 AM
Louis
0
thanks for the help 😄
13th Aug 2018, 9:57 AM
Louis