getsprogramming Tutorials , C Programming, CPP Programming and JAVA Programming , Python Programming , Javascript Programming Welcome to getsprogramming Blog Here You Find Different Programs in Easier way to Explain and gain Knowledge and Try Your Self..Thanks
Showing posts with label #cprograms #turboc. Show all posts
Showing posts with label #cprograms #turboc. Show all posts
Wednesday, 22 January 2025
Saturday, 22 August 2015
Write a C Program to print year, month and remaining days.
#include<stdio.h>
#include<conio.h>
int main()
{
int day,y,m; /*day for day
input & output,
y for
calculate year,
m for
calculate month
printf("Enter the
number of days : ");
scanf("%d",&day);
y=day/365; //calculate years
day%=365; // calculate remaining days
m=day/30; // calculate months
day%=30; // calculate remaining days
printf("%d years,%d
months, %d days",y,m,day);
getch();
return 0;
}
Subscribe to:
Posts (Atom)

