#include< stdio.h >
#include< conio.h >
void main ()
{
int n1, n2, num;
clrscr();
printf("Enter a two digit number:");
scanf("\t%d",&num);
n2 = num%10;
num = num / 10;
n1 = num%10;
printf(" The digits are :\n%d\n%d",n1,n2);
getch();
}
OUTPUT :
Enter a two digit number: 25
The digits are :
2
5
#include< conio.h >
void main ()
{
int n1, n2, num;
clrscr();
printf("Enter a two digit number:");
scanf("\t%d",&num);
n2 = num%10;
num = num / 10;
n1 = num%10;
printf(" The digits are :\n%d\n%d",n1,n2);
getch();
}
OUTPUT :
Enter a two digit number: 25
The digits are :
2
5
No comments :
Post a Comment