0

An efficient way to code this one?

https://code.sololearn.com/cpBF0N7Uzjqq/?ref=app

16th Oct 2017, 5:41 PM
Pranav Takkar
3 Antworten
16th Oct 2017, 5:47 PM
Lakshay
Lakshay - avatar
+ 4
As @Ahmed and Lakshay suggests, use if statements instead.
16th Oct 2017, 9:21 PM
Manual
Manual - avatar
+ 2
#include <iostream> using namespace std; int main() { int age; cout<<"enter you age"<<endl; cin>>age; if (age < 16) {cout<<"junior"<<endl;} else {cout<<"adult"<<endl;} return 0; }
16th Oct 2017, 7:25 PM
Ahmed Mudhafar Mohsin
Ahmed Mudhafar Mohsin - avatar