NO. REVERSER
#include <stdio.h>
int main() {
// Write C code here
int a,b=0,c,d,e;
printf("enter the no : ");
scanf("%d",&a);
while(a/10!=a){
printf("%d\n",a%10);
b=10*(b+(a%10));
a=a/10;
}
printf("%d",b/10);
//***actual method***
#include <stdio.h>
int main() {
// Write C code here
int a,b=0,c,d,e;
printf("enter the no : ");
scanf("%d",&a);
while(a/10!=a){
printf("%d\n",a%10);
b=b*10+a%10;
a=a/10;
}
printf("%d",b);
return 0;
}
return 0;
}
Comments
Post a Comment