Program for Reversing of a number using goto
#include<stdio.h> #include<conio.h> void main ( ) { int x, n, y = 0; printf (“enter a number”); scanf (“%d”, &am...
https://www.computersprofessor.com/2016/06/program-for-reversing-of-number-using.html?m=0
#include<stdio.h>
#include<conio.h>
void main ( )
{
int x, n, y = 0;
printf (“enter a number”);
scanf (“%d”, & n);
sai :
if ( n > 0)
{
x = n%10;
y = y * 10 + x;
n = n/10;
goto sai;
}
printf (“%d”, x);
printf (“%d”, y);
printf (%d”,n);getch();
}