Showing posts with label Program to convert Days to Months (30 days) and days. Show all posts
Showing posts with label Program to convert Days to Months (30 days) and days. Show all posts

Tuesday, May 25, 2010

Program to convert Days to Months (30 days) and days

/*
* Program to convert Days to Months (30 days) and days.c
*
* Created on: May 25, 2010
* Author: Karthikeyan
*/

# include <stdio.h>
# include <stdlib.h>

int main()
{
int months,days;
printf("Enter days\n");
scanf("%d",&days);
months = days / 30;
days = days % 30;
printf("Months = %d \n Days = %d",months,days);
return 0;
}


OUTPUT:


Enter days 365
Months = 12
Days = 5