+ 1

#Include <Iostream> using namespace std; { Int num=1 While(num<6) { Cout<< "Number"<< num<<endl; Num=num+3; } }

what an error?

12th Apr 2017, 7:12 PM
Abdi
Abdi - avatar
6 Answers
+ 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 } }
12th Apr 2017, 7:40 PM
Shamima Yasmin
Shamima Yasmin - avatar
+ 6
Where is our favorite int main()?😅 Also try to use different variables instead of capitalizing separate letters. Most languages are case-sensitive
12th Apr 2017, 7:14 PM
Dinmukhamed Mailibay
Dinmukhamed Mailibay - avatar
+ 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
12th Apr 2017, 7:19 PM
Dinmukhamed Mailibay
Dinmukhamed Mailibay - avatar
+ 2
int main() is missing. is that an error?
12th Apr 2017, 7:19 PM
Abdi
Abdi - avatar
+ 1
int main() is missing. is that an error?
12th Apr 2017, 7:18 PM
Abdi
Abdi - avatar
- 1
include, iostream, while, int and cout are written with small letters.
12th Apr 2017, 7:20 PM
merkrafter