+ 5

I am a beginner and I came up with this code.. I want you guys to reveal all the mistakes I did. Comment as much as you can!!?

array code https://code.sololearn.com/cKX7Rj0Eyrqv/?ref=app

31st Aug 2018, 7:37 AM
Benjamin Shefika
Benjamin Shefika - avatar
7 Respuestas
+ 6
//Here's a shorter and neater version of your code //If there is a single statement inside a condition/loop you can ignore the the curly braces #include <iostream> using namespace std; int main() { int a,c; cout<<"How old are you?\n"; cin>>a; if(a>15 && a<60) { cout<<"Enter your exam marks\n"; cin>>c; } else cout<<"you are not part of the age group"<<endl; if(c>=80 && c<=100) cout<< "you passed, and you are going on tour\n"; else cout<<"you failed, and you\'re not going on tour\n"; return 0; }
31st Aug 2018, 7:11 PM
blACk sh4d0w
blACk sh4d0w - avatar
+ 8
It's fine.. great work. Try harder problems and challenges. Solve the assignments so you can master the skills. Best of luck😊😊
31st Aug 2018, 9:58 AM
Aaron Stone
Aaron Stone - avatar
+ 4
31st Aug 2018, 10:43 AM
Benjamin Shefika
Benjamin Shefika - avatar
+ 4
amazing.
31st Aug 2018, 7:15 PM
Benjamin Shefika
Benjamin Shefika - avatar
+ 1
Cool code. Needs work though
3rd Sep 2018, 5:41 PM
fareed
fareed - avatar
0
da
13th Sep 2018, 8:26 AM
Диана Бикбулатова
Диана Бикбулатова - avatar
0
Cool code
3rd Oct 2018, 6:42 AM
jacob reuben
jacob reuben - avatar