+ 1

I need help again pls. Switch Statement 1 -1stYear 2 -2ndYear 3 -3rdYear 4 -4thYear ----- Example: Enter Num:2 2ndYear

10th Mar 2019, 11:43 PM
Rhea May Abay
Rhea May Abay - avatar
11 Respostas
+ 3
Here you go: int x; cin >> x; switch(x) { case 1: cout << "1stYear" << endl; break; case 2: cout << "2ndYear" << endl; break; ... // optional default: cout << "Wrong Input" << endl; }
11th Mar 2019, 12:08 AM
Peter Popoola
Peter Popoola - avatar
+ 2
Yeah. Just add the remaining two cases. You might also want to print out a prompt for input. And, btw, if you would take the C++ course available here, it would help you a lot!
11th Mar 2019, 2:10 AM
Peter Popoola
Peter Popoola - avatar
+ 1
#include <iostream> using namespace std; int main() { int limit=4; for (int i=0;limit;i++) std::"1stYear-4thYear\n"; }
11th Mar 2019, 12:10 AM
Rhea May Abay
Rhea May Abay - avatar
+ 1
Wrong
11th Mar 2019, 12:10 AM
Rhea May Abay
Rhea May Abay - avatar
+ 1
My codes
11th Mar 2019, 12:26 AM
Rhea May Abay
Rhea May Abay - avatar
+ 1
I need show codes pls and for run it :( need help guys
11th Mar 2019, 12:27 AM
Rhea May Abay
Rhea May Abay - avatar
+ 1
I need run it in C++
11th Mar 2019, 12:28 AM
Rhea May Abay
Rhea May Abay - avatar
+ 1
Show it pls
11th Mar 2019, 12:28 AM
Rhea May Abay
Rhea May Abay - avatar