Created
March 21, 2017 18:25
-
-
Save ninpl/161a6b7e0204a7a3c4770b2d4beeb636 to your computer and use it in GitHub Desktop.
Estructura condicional multiple
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Practica para refrescar la sintaxis de C++ | |
| #include <iostream> | |
| using namespace std; | |
| int main() | |
| { | |
| //ESTRUCTURA CONDICIONAL MULTIPLE | |
| char variable; | |
| cin>>variable; | |
| switch(variable) | |
| { | |
| case '1': cout<<"Caso 1"<<endl; | |
| break; | |
| case '2': cout<<"Caso 2"<<endl; | |
| break; | |
| case '3': cout<<"Caso 3"<<endl; | |
| break; | |
| default: cout<<"Ningun caso"<<endl; | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment