Ver Mensaje Individual
  #7 (permalink)  
Antiguo 04/01/2013, 13:41
Avatar de L3m0n
L3m0n
 
Fecha de Ingreso: diciembre-2011
Mensajes: 219
Antigüedad: 12 años, 3 meses
Puntos: 46
Respuesta: Invertir número en C

Cita:
Iniciado por cronopiomx Ver Mensaje
Hola, podrias usar la funcion reverse() y te funciona, he aqui 1 ejemplo
Código:
#include <iostream>
#include <algorithm>
#include <string>
using namespace std;

int main ()
{
   string a = "90800";
   
   reverse(a.begin(), a.end());
   cout<<a;
 
 system("pause");   
}

Estamos en C, no en C++ :P