बिजनेस मार्केटिंग का लो कॉस्ट फंडा , अपने मोबाइल से ऑटो sms भेजकर मार्केटिंग करे विजिट करे http://autotextsms.com/ बिजनेस मार्केटिंग का लो कॉस्ट फंडा http://autotextsms.com/

Search This Blog

Translate

C program to reverse 4 digit number, c program logic to reverse given number

C program  to reverse 4 digit number,
C program  to reverse four digit number without using loop ,
c program  logic to reverse given number ,

#include
#include
void main()
{
int n,rem,newn,a;

clrscr();
printf("Enter the 4 digit number=");
scanf("%d",&n);
a=n;
rem=n%10;
newn=rem*1000;
n=n/10;
rem=n%10;
newn=newn+(rem*100);
n=n/10;
rem=n%10;
newn=newn+(rem*10);
n=n/10;
rem=n%10;
newn=newn+(rem*1);
n=n/10;
printf("\n\nThe original number is=%d",a);
printf("\n\n\n\nAfter reverse the number is=%d",newn);
getch();
}



C program  to reverse 4 digit number,
C program  to reverse four digit number without using loop ,
c program  logic to reverse given number ,

C Program example List