+ 9

What's wrong with this program?

#include <iostream> using namespace std; int main() { for (int x=1,x<10,x++){ cout <<x<<"." <<"gaurav"; } return 0; }

13th Nov 2016, 10:35 AM
Gaurav Pandey
Gaurav Pandey - avatar
2 Respuestas
+ 4
for (int x=1;x<10;x++) You need to use semi-colon (;) instead of comma (,).
13th Nov 2016, 10:37 AM
Nagendra Prajwal
Nagendra Prajwal - avatar
+ 8
thanks
13th Nov 2016, 10:42 AM
Gaurav Pandey
Gaurav Pandey - avatar