+ 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 Respostas
+ 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