0

How to use Switch Case In c...what is the syntex ??

C Language

15th Nov 2017, 12:11 AM
Suraj kumar
Suraj kumar - avatar
4 Respostas
15th Nov 2017, 12:21 AM
Manual
Manual - avatar
+ 12
https://www.tutorialspoint.com/cprogramming/switch_statement_in_c.htm
15th Nov 2017, 12:34 AM
qwerty
qwerty - avatar
+ 4
This is C++ example from the SL course #include <iostream> using namespace std; int main() { int age = 25; switch (age) { case 16: cout << "Too young"; break; case 42: cout << "Adult"; break; case 70: cout << "Senior"; break; default: cout << "This is the default case"; } return 0; }
15th Nov 2017, 12:26 AM
Daniel
Daniel - avatar
+ 3
thank You guys...;)
15th Nov 2017, 1:56 AM
Suraj kumar
Suraj kumar - avatar