Write a program to print the Year, Month and Date after input the days
#include<stdio.h>
#include<conio.h>
main()
{
int year, remainder, months, days, no_days;
printf("\n\nEnter the number of days : ");
scanf("%d",&no_days);
year=no_days/365;
remainder=no_days%365;
months=remainder/30;
days=remainder%30;
printf("\n\nYour entered days = %d",no_days);
printf("\n\n\nYears = %d \tMonths = %d \tDays = %d",year,months,days);
printf("\n\n\n\n\n\nTHANKING YOU VERY MUCH 'ABHIMANYU KUMAR VATSA'");
getch();
}
Comments
Post a Comment