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
Rule: To determine the canonical form we should OR the min terms. A min term is defined as a Boolean equation of the input if the output is logic '1'. If the input is logic '1'

Given an integer n and a permutation of numbers 1, 2 ... , n-1, n write a program to print the permutation that lexicographically precedes the given input permutation. If the given


Define Functions with arguments and no return values The calling function will read a data from the terminal and pass it on to called as function and this will work good as the

A: A reference has to always refer to some object and, so, must always be initialized; pointers do not have such limits. A pointer may be reassigned to point to distinct objects wh

A palindrome is a string that reads the same from the both the ends. Given a string S convert it to a palindrome by doing character replacement. Your takes is to convert S to palin

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers

write a program that adds all numbers from 1 to 200

Write a program called A1Q3, that reads it the radius of a circle as an integer and prints the circle's diameter, circumference and area.  Use a constant value for pi.  Do all calc

When you are designing a generic class to have or otherwise manage objects of other types, when the format and behavior of those other types are unimportant to their containment or