Created
March 21, 2017 18:35
-
-
Save ninpl/8b86270112de75e1086dbeb413d7e76b to your computer and use it in GitHub Desktop.
Escriba un programa que diga si un numero entero ingresado es par o impar
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() | |
| { | |
| //Escriba un programa que diga si un numero entero ingresado es par o impar | |
| int numero; | |
| cout<<"Ingrese el numero:"; | |
| cin>>numero; | |
| if(numero%2==0) | |
| { | |
| cout<<"El numero es par"<<endl; | |
| } | |
| else | |
| { | |
| cout<<"El numero es impar"<<endl; | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment