#include<stdio.h>
#include<conio.h>
void main()
{
int in_days, years, months, days, flag;
printf("Enter number of days : ");
scanf("%d", &in_days);
years = in_days/365;
flag = in_days%365;
months = flag/30;
days = flag%30;
printf("%d days is same as %d years + %d months + %d days", in_days, years, months, days);
getch();
}
#include<conio.h>
{
int in_days, years, months, days, flag;
printf("Enter number of days : ");
scanf("%d", &in_days);
years = in_days/365;
flag = in_days%365;
months = flag/30;
days = flag%30;
printf("%d days is same as %d years + %d months + %d days", in_days, years, months, days);
getch();
}
No comments:
Post a Comment