Asa e corect:
#include <iostream.h>
#include <conio.h>
int main()
{
int a,b=0;
cout<<"Scrie o valoare pentru variabila a ";
cin>>a;
while (a!=0){
b=b*10+a%10;
a=a/10;
}
cout<<"Numarul inversat este "<<b;
getch ();
return 0;
}
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.