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

C Program to Take Input from User in Year and Convert into Days, Month and Weeks, Write a program to take input from user in years and convert those years into days, month, weeks.

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=%d\nMonth=%d\nWeeks=%d",days,month,week);
        getch();
}

Output

Year and Convert into Days, Month and Weeks

You May Also Like...

Socialize with Us