Sunday, 2 June 2013

c programming


#include<stdio.h>
#include<conio.h>

void main(){
int digits, num=1234, newNum=0;
clrscr();
while(num!=0){
newNum=newNum*10 + num%10;
num=num/10;
}
printf("\n");
printf("%d", newNum);
getch();
}

Output:

4321

1 comment:

Blog Archive