Logo 
Search:

C Programming Articles

Submit Article
Home » Articles » C Programming » Homework HelpRSS Feeds

Program to calculate months in a provided number of days from user

Posted By: Phil Sanchez     Category: C Programming     Views: 9405

Program to calculate months in a provided number of days from user

Code for Program to calculate months in a provided number of days from user in C Programming

#include<stdio.h>
#include<conio.h>
main()
{
    int months, days;
    clrscr();
    printf("Enter days\n");
    scanf("%d",&days);
    months = days / 30;
    days = days % 30;
    printf("Months +%d  Days = %d", months, days);
    getch();
    return 0;
}
  
Share: 



Phil Sanchez
Phil Sanchez author of Program to calculate months in a provided number of days from user is from New York, United States.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!