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

Program to find maximum of three number using user define function in C++

A function can be define by the user as per the requirement of the user or programmer . To implement a user define function , a programmer ...