Created
August 29, 2014 20:39
-
-
Save brayancruces/9d3ffc5428c373dd4652 to your computer and use it in GitHub Desktop.
EJERCICIO 06 - C++
This file contains 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
// EJERCICIO 06 - C++ UNIDAD | |
#include <iostream> | |
#include <conio.h> | |
using namespace std; | |
int main() | |
{ | |
int numero,m,c,d,u,numinvertido; | |
cout<<"ingrese un numero de 4 digitos"; | |
cin>>numero; | |
m= numero/1000; | |
c = (numero % 1000)/100; | |
d = (numero%100) /10; | |
u = numero %10; | |
numinvertido= u*1000+d*100+c*10+m; | |
cout<<"El numero invertido es: "<<numinvertido; | |
_getch(); | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment