-->

Facebook

Jasper Roberts - Blog

Thursday, September 18, 2014

Write a C Program to convert years into months and days.

#include<stdio.h>
#include<conio.h>

void main()
{
int years,months,days;
clrscr();

printf("\n Enter the number of years: ");
scanf("%d",&years);

months = 12 * years;

days = 365 * years;

printf("\n Total Months are : %d",months);
printf("\n Total Days are : %d",days);

getch();

}

OUTPUT:

c program to convert years into months and days
years.c

No comments:

Post a Comment