C Books Guide and List
C++ Books Guide and List
Best Java Books

3,749 questions

4,049 answers

114 comments

10,705 users

C PROGRAM TO REVERSE A NUMBER

0 votes
37 views
asked by anonymous

1 Answer

0 votes
 
Best answer
 int main()  
 {  
   int a;  
   printf("Enter a number :");  
   scanf("%d",&a);  
   int y=0;  
   while(a)  
   {  
     y=y*10+a%10;  
     a=a/10;  
   }  
   printf("\nreverse= %d",y);  
   getch();  
   return 0;  
 } 
answered by anonymous

Related questions

0 votes
1 answer 3,138 views
+1 vote
1 answer 4,781 views
0 votes
2 answers 739 views
...