Print Friendly and PDF
#include<stdio.h> 
#include<conio.h> 
int main() 
{ 
int num,temp,factor=1; 
printf("Enter a number: "); 
scanf("%d",&num); 
temp=num; 
while(temp) 
{ 
temp=temp/10; 
factor = factor*10; 
} 
printf("Each digits of given number are: "); 
while(factor>1) 
{ 
factor = factor/10; 
printf("%d, ",num/factor); 
num = num % factor; 
} 
getch(); 
}
zubairsaif

Zubair saif

A passionate writer who loves to write on new technology and programming

Post A Comment:

0 comments: