begginer help me with this problem using code blocks | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

begginer help me with this problem using code blocks

int num = 1; int number; while (num <= 5) { cin >> number; num++; } getting error expected unqualified-id before 'while'

9th Apr 2020, 3:08 PM
Aditya Sarmalkar
Aditya Sarmalkar - avatar
4 Answers
+ 2
Where is your main() function ??
9th Apr 2020, 3:13 PM
Arsenic
Arsenic - avatar
+ 1
Just add your complete code here.
9th Apr 2020, 3:11 PM
Arsenic
Arsenic - avatar
0
#include <iostream> using namespace std; int num = 1; int number; while(num <= 5) { cin >> number; num++; }
9th Apr 2020, 3:12 PM
Aditya Sarmalkar
Aditya Sarmalkar - avatar
0
rookie mistake anyways thanks
9th Apr 2020, 3:28 PM
Aditya Sarmalkar
Aditya Sarmalkar - avatar