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
program that decodes sending smuggler''s string

Static Member Functions All the objects of the class share static data members of a class. The example above demonstrates how to keep track of all the objects of a class which

C Program for SORTING # include stdio.h> void main() {           char a;           int *p;           int i,j,temp;           clrscr();           p=&i;

Write a program which incorporates a function named compute and which is used to calculate the area and circumference of a circle. Use the main function for inputs and outputs.

Write a C++ program with header and source files to store street addresses using the Doubly Linked List ADT. Modify the Node class from Lab Assignment 3 so that it becomes a node i

Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Nec

The #undef Directive This directive undefines a previously explained macro. For, example the following will give an error since PI is undefined.                 #define PI 3

Two kinds of line detection are implemented in OpenCV, the Hough Transform and the probabilistic Hough transform. Assume that there are n feature points in an image and that it tak

Write a program to find the area under the curve y = f(x) between x = a and x = b, integrate y = f(x) between the limits of a and b.   #include float start_poin

Find out initial basic feasible solution for the given transportation problem using Least Cost Method (LCM).