Friday, January 21, 2011

Operators and Expressions

The program which shows the use of integer arithmetic to convert a given number of days into months and days.
#include<stdio.h>
void main()
{
int months, days;
printf("Enter days\n");
scanf("%d",&days);
months=days/30;
days=days%30;
printf("Months =%d Days =%d, months,days);
getch();
}

No comments:

Post a Comment