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...

#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();
}

Related

C Programs 4448260494384607660

Post a Comment

emo-but-icon

item