Problem: HELP Required Write a C Program that output the very next date after Input a date
suppose :
Input: (DD/MM/YYYY) 21/09/2012
OUTPUT: 22/09/2012
Thanks in Advance.
Problem: HELP Required Write a C Program that output the very next date after Input a date
suppose :
Input: (DD/MM/YYYY) 21/09/2012
OUTPUT: 22/09/2012
Thanks in Advance.
What have you tried?
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
3. Get rid of conio.h and other antiquated DOS crap headers.
4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.
I try to write an algorithm first of all.. But my head goes off.. I have to submit this project in my class in 3 days. Pls help me..
1. Get rid of gets(). Never ever ever use it again. Replace it with fgets() and use that instead.
2. Get rid of void main and replace it with int main(void) and return 0 at the end of the function.
3. Get rid of conio.h and other antiquated DOS crap headers.
4. Don't cast the return value of malloc, even if you always always always make sure that stdlib.h is included.
Let me try it myself. Thanks..
Last edited by riyaj123; 03-27-2012 at 09:57 AM.
God save me. '
Last edited by riyaj123; 03-27-2012 at 09:57 AM.
Someone should erase the above. Who knows what it says?
The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss
How about starting with the basics?
Until that works reliably, there isn't much point in considering the next step.Code:int day, month, year; // some stuff to prompt for, and read input, and store in the appropriate variables. printf("Day=%d\n", day ); printf("Month=%d\n", month ); printf("Year=%d\n", year );
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
help me. Pls anyone pls get me the code.
help me. Pls anyone pls get me the code.
No.
*thread closed*
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)