Q:Write a program where in user is asked to input the age in years and program displays his age in months and days
#include
#include
void main()
{
float y,m,d;
clrscr();
printf("\tEnter age in years:");
scanf("%f",&y);
m=y*12;
d=y*365;
printf("age in months:%f\n",m);
printf("age in days:%f\n",d);
getche();
}
No comments:
Post a Comment