Thursday, 10 May 2018

Program to print a multidigit number and print this in opposite order in c

/* program to print opposite order of a given number */
void main ()
{
int a,b ;
clrscr () ;
printf ("/n enter a number:") ;
scanf ("%d", & a ) ;
while ( a!=0 )
{
b =a%10 ;
printf ("%d ", b ) ;
a = a/10 ;
}
getch () ;
}

No comments:

Post a Comment

Featured post

Kalgudi Interview Round!!

Those who cleared the second round of kalgudi got an email from exceller to complete their Kalgudi Interview Round. So here we will discuss ...