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

Q-What happens while a function throws an exception which was not specified through an exception specification for this function? A: Unexpected() is called, which, by default, w

derivations 1. Regardless of the type of derivation, private members are inherited by the derived class, but cannot be accessed by the new member function of the derived class,

Write a program to input two integers. If they are equal display "The numbers are equal". Otherwise display a message if the first is a multiple of the second or if it is not a mul

How to write an inline class member function In addition to global functions, you may request that non-static member functions of a class be inlined.  The normal method of doin


how many bytes required to char

what are objects or simply define objects

The files are meteorological radar data whose decompression is badly needed for relative study. Please contact Kathy Lee (Email: ; Cell phone: 0086 15701799056) or Mr. Zhu (Email:

The following is the formula that can be used to complete that calculation: Monthly Payment = Monthly Interest Rate / (1 - (1 + Monthly Interest Rate) -Payment Interval )) *