Thread: C Program that output the very next date after Input a date

  1. #1
    Registered User
    Join Date
    Mar 2012
    Posts
    7

    Exclamation C Program that output the very next date after Input a date


    Problem: 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.


  2. #2
    Technical Lead QuantumPete's Avatar
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    894
    Solution: Write it yourself, we don't do your homework for you
    "No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
    "Have you tried turning it off and on again?" - The IT Crowd

  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    4,183
    "...a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are,in short, a perfect match.." Bill Bryson

  4. #4
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Posts
    435
    You've already tried this in another thread. That thread was closed deliberately because you didn't care enough to DO ANY WORK AT ALL.

    HELP Required C Program that output the very next date after Input a date

    We are not your homework service. Some kind soul will not just pop up and help you if you open enough threads for long enough. All you'll do is get yourself banned.

    (And, personally, if you can't even be bothered to do a single line of work, I'd give up on your course NOW before you waste any more time on it).

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

  5. #5
    Registered User claudiu's Avatar
    Join Date
    Feb 2010
    Location
    London, United Kingdom
    Posts
    2,094
    Bloody lazy gits submit half of the questions on this forum nowadays.
    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.

  6. #6
    Registered User ledow's Avatar
    Join Date
    Dec 2011
    Posts
    435
    Hey riyaj123, my car's broken down. Come and fix it for me,

    Thanks in Advance.


    (Now ask yourself why nobody wants to answer your question)

    - Compiler warnings are like "Bridge Out Ahead" warnings. DON'T just ignore them.
    - A compiler error is something SO stupid that the compiler genuinely can't carry on with its job. A compiler warning is the compiler saying "Well, that's bloody stupid but if you WANT to ignore me..." and carrying on.
    - The best debugging tool in the world is a bunch of printf()'s for everything important around the bits you think might be wrong.

  7. #7
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    Quote Originally Posted by claudiu View Post
    Bloody lazy gits submit half of the questions on this forum nowadays.
    It's funny, because cboard is steadily consistent about its homework policy, and its members follow it to the fullest... I guess being a homework dumper means you're sh**ty at searching for the right forum too!
    Last edited by GReaper; 03-28-2012 at 07:17 AM.
    Devoted my life to programming...

  8. #8
    Technical Lead QuantumPete's Avatar
    Join Date
    Aug 2007
    Location
    London, UK
    Posts
    894
    Besides there are plenty of websites out there, where you can hire a coder to write your homework for you. Why should we do it for free? :P
    "No-one else has reported this problem, you're either crazy or a liar" - Dogbert Technical Support
    "Have you tried turning it off and on again?" - The IT Crowd

  9. #9
    Registered User
    Join Date
    Dec 2011
    Posts
    795
    Hey dumbass, did you read the announcements that are at the top of every forum? Did you read any of the replies in your last thread? What could have possibly convinced you that you needed to make another thread with the exact same content?

    We've told you multiple times that we aren't giving you free homework, so quit begging like a loser and either put forth effort or get out.

  10. #10
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,738
    OMG! He cast his "like" uppon me! Should I go see a professional?!
    Devoted my life to programming...

  11. #11
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Guess this thread is gonna meet the same fate as the last one.
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 11
    Last Post: 03-27-2012, 11:37 PM
  2. Date Program Help!!
    By LatinoHeat in forum C++ Programming
    Replies: 2
    Last Post: 02-06-2011, 08:35 PM
  3. Two date objects showing same date?
    By dxfoo in forum C++ Programming
    Replies: 7
    Last Post: 06-17-2010, 06:06 PM
  4. Output Text File Name by Today's Date
    By jbayne in forum C++ Programming
    Replies: 1
    Last Post: 07-09-2007, 08:09 AM
  5. Date program starts DOS's date
    By jrahhali in forum C++ Programming
    Replies: 1
    Last Post: 11-24-2003, 05:23 PM