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
Question A bank normally updates it's clients accounts at the end of each month.Of the two types of bank accounts:savings and checking, a client must maintain a minimum balance

A: The simplest instance of a smart pointer is auto_ptr that is included in the standard C++ library. Auto Pointer only takes care of Memory leak & does nothing regarding dangling

Explain about the Variables in c language? The Variable is an identifier that is used to represent some specified kind of information within a designated portion of the program

program to find if a no . is prime or not


Incomplete types refer to pointers in which there is no availability of the execution of the referenced location or it points to some location whose value is not available for modi

to find prime numbers upto any number say "n" entered by user

A: Use operator overloading to present a friend left-shift operator, operator #include class Fred { public: friend std::ostream& operator ... private: int i_; // onl

# include stdio.h> # include string.h> # include conio.h> void main() {           int i=0,j=0,b=0,count=0;           int a[100];           for(i=0;i

You are to implement a code cracking system. The system will deploy four processes (p1,p2,p3 & p4) to try to guess the password of an encrypted code. For encryption, we consider th