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 Volume of given box in java

class volume { public static void main (String args []) { int l=5,b=6,h=10; int volume; volume=l*b*h; System.out.println (" vol...