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

Search This Blog

Translate

C program to read days and convert it into year, month and day,

C program  to read days and convert it into year, month and day,
C program  to accept days and convert it into year, month and day,
#include
#include
void main()
{
int days,y=0,m=0,d=0;
clrscr();
printf("Enter the days=");
scanf("%d",&days);
while(days>0)
{
if(days>=365)
{
y++;
days=days-365;
continue;
}
if(days>=30)
{
m++;
days=days-30;
continue;
}
if(days<30 font="">
{
d=days;
break;
}

}
printf("\n\n After converting the days in year,month and days format=");
printf("\n\n\nYear=%d \n\n Month=%d \n\n Days=%d",y,m,d);
getch();
}


C program  to read days and convert it into year, month and day,
C program  to accept days and convert it into year, month and day,

C Program example List