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

Popular posts from this blog

Customize User's Profile in ASP.NET Identity System

Migrating database from ASP.NET Identity to ASP.NET Core Identity