cprogramming help

This is a discussion on cprogramming help within the C Programming forums, part of the General Programming Boards category; I have a program to write for my c programming class. I have to set up a date conversion program. ...

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    1

    Post cprogramming help

    I have a program to write for my c programming class. I have to set up a date conversion program. Input a date as 12/07/02 and have the program print it a dec 07, 2002.(the date may be entered as one string or 3 separate integers.)

    I also have to check for invalid days of the month, and when the day is invalid post a message "Day invalid"

    could someone please help me??????????

  2. #2
    Banned master5001's Avatar
    Join Date
    Aug 2001
    Location
    Visalia, CA, USA
    Posts
    3,685
    First off welcome to the boards, seconds off I'd like to inform you of where we all stand. We will help you but we won't do your work for you. Get your basic program written and post your code, then we can help you.

  3. #3
    Registered User Vber's Avatar
    Join Date
    Nov 2002
    Posts
    807

    just like master5001 said

    Make your basic code, if you'll get in problems, post your code here, and we'll try to help you.

    I think you'll need array to solve this question, good luck.
    Last edited by Vber; 12-10-2002 at 03:48 PM.

  4. #4
    Registered User datainjector's Avatar
    Join Date
    Mar 2002
    Posts
    356
    just a hint firs of use this

    scanf("%d%*c%d%*c%d", month, day, year );

    Well if the person enters say 12/12/2002 it trows away the / so if the person enter 12:12:2002 it does the same thin..


    You can make a *array[]={"NULL","Jan", "Feb".....

    So is the month os 2 then do this printf( "%s", array[month] );

    Now try to build your code..
    "I wish i could wish my wishs away"

    "By indirections find directions out" -- William Shakespears

    "Do what thou wilt shall be the whole of the law" -- Crowley "THE BEAST 666"

    Mizra -> love = Death...
    RDB(Rocks yooo)..

    http://www.cbeginnersunited.com

    Are you ready for the Trix ???

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Question about Cprogramming
    By abachler in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 04-10-2008, 09:34 AM
  2. Wikipedia CProgramming Entry?
    By jverkoey in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 07-27-2005, 09:15 PM
  3. #cprogramming
    By Dual-Catfish in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 05-04-2002, 09:37 PM
  4. David's CProgramming Theorem
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 10
    Last Post: 08-14-2001, 12:29 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21