This C Program convert an integer number into Year , Month and Date.
Program :
Output :
Program :
#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
do{
long int n,y,m,d;
clrscr();
printf("\n\t Enter no convert into Year , Monthe and Date:");
scanf("%d",&n);
y=n/365;
n=n%365;
m=n/30;
d=n%30;
printf("\n\t<%d> year <%d>month <%d> date\n",y,m,d);
printf("\n \t Enter continue(y/n):");
ch=getch();
}while(ch=='y'||ch=='Y');
}
Output :
If you have any Further Information and Quires about this Article don't hesitate to comment in comment box below.
AND
If you like this article , like our Facebook like page and click +1 to support 123techguide
|