C Program to Take Input from User in Year and Convert into Days, Month and Weeks

0
16
digitalample eye
Write a program to take input from user in years and convert those years into days, month, weeks.

C Code

#include <stdio.h>
#include <conio.h>
void main()
{
int d,year,month,days,week;
clrscr();
printf("Enter year :");
scanf("%d",&d);
days=d*365;
month=d*12;
week=d*52;
printf("Days=%dnMonth=%dnWeeks=%d",days,month,week);
getch();
}

Output

Year and Convert into Days, Month and Weeks

LEAVE A REPLY

Please enter your comment!
Please enter your name here