C program to check display days and months , C/C++ Programming

C program to check display days and month

main()

{

          int months, days;

          clrscr();

          printf("ENTER DAYS: ");

          scanf("%d", &days);

          months=days/30;

          days=days%30;

          printf("\nMONTHS = %d   DAYS = %d", months, days);

          getch();

}

 

OUTPUT :

Enter days: 35

Months=1  Days=5

Posted Date: 9/10/2012 2:06:10 AM | Location : United States







Related Discussions:- C program to check display days and months , Assignment Help, Ask Question on C program to check display days and months , Get Answer, Expert's Help, C program to check display days and months Discussions

Write discussion on C program to check display days and months
Your posts are moderated
Related Questions
create a flowchart that display the assume that there are 3 section each student ?

Project Description: We own proprietary software which long ago had Copyminder protection added. We no longer have the source code or a relationship with the original coder and

A student apears in exam of math, physics, and chemistry. Write a program to find the total marks aa student has aqueired find the average.


Presently we are using several spreadsheets to give weekly activity and income reports. Much of the information is being frequently re-keyed into several spreadsheets - we are look

Is there any difficulty with the following : char*a=NULL; char& p = *a;? A: The result is indeterminate. You must never do this. A reference has to always refer to some object.

Write a program that writes your name on the monitor ten times. Write this program three times, once with each looping method.

Why are all header files not declared in every C program? - Declaring all header files in each program would result in increase in overall file size and load of the program. It

Conversion Functions Conversion functions are member functions used for the following purposes: 1. Conversion of object to basic data type. 2. Conversion of basic data ty