0
I'm trying to have this simple code for while looping so that i could have an output of "I love this!" but its results to error
#include<stdio.h> int main() int n=0; while (n<5) { printf ("I love this!\n"); n++; }
6 Respuestas
+ 3
// 'main' function definition lacks curly brackets:
#include<stdio.h>
int main() {
int n=0;
while (n<5) {
printf ("I love this!\n");
n++;
}
}
+ 1
you are missing "{ }", for int main().
should be.
int main() {
//your code
while{
//your code
}
return 0 ;
}
+ 1
you're right ;)
0
Thanks! Gahhhddd totally forgot the simplest thing to include!
0
Correct me if I'm wrong😊
0
Thanks!