+ 1
#Include <Iostream> using namespace std; { Int num=1 While(num<6) { Cout<< "Number"<< num<<endl; Num=num+3; } }
what an error?
6 odpowiedzi
+ 19
#include <iostream> // small i
using namespace std;
int main(){ // execution point
int num=1; // missing semicolon
while(num<6) { // small w
cout<< "Number: "<< num<<endl;
// cout
num=num+3;
// Num and num are not same
}
}
+ 6
Where is our favorite int main()?😅
Also try to use different variables instead of capitalizing separate letters. Most languages are case-sensitive
+ 6
I hope all the capitalization of letters is here due to auto capitalizing when inputing. iostream, int, while, num keywords shouldn't be capitalized. It should work now
+ 2
int main() is missing.
is that an error?
+ 1
int main() is missing.
is that an error?
- 1
include, iostream, while, int and cout are written with small letters.