0

Can someone confirm if my code is okay

C++ coding

22nd Dec 2022, 2:18 PM
Alex Boso Nzaphila
Alex Boso Nzaphila - avatar
5 Answers
+ 3
Your code uses pairs of square brackets [ ] to define blocks of code where curly brackets { } should be And please, next time avoid writing code in the post tags. Tags in forum posts have a distinct purpose ... https://code.sololearn.com/W3uiji9X28C1/?ref=app
22nd Dec 2022, 4:04 PM
Ipang
+ 2
#include <iostream> using namespace std; int main() { int age=18; cin>> age; if (age>=16) cout<<"welcome"; else cout<<"Not allowed"; return 0; }
22nd Dec 2022, 2:30 PM
SoloProg
SoloProg - avatar
0
#include <iostream> using namespace std; int main() [ int age=18; cin>> age; if (age>=16) [ cout<<"welcome"; ] else [ cout<<"Not allowed"; ] }
22nd Dec 2022, 2:21 PM
Alex Boso Nzaphila
Alex Boso Nzaphila - avatar
0
Can someone experienced in c++ debugg that code
22nd Dec 2022, 2:21 PM
Alex Boso Nzaphila
Alex Boso Nzaphila - avatar
0
Okay let me try
22nd Dec 2022, 2:37 PM
Alex Boso Nzaphila
Alex Boso Nzaphila - avatar