Exforsys
+ Reply to Thread
Results 1 to 4 of 4

Display Year&Month Program

This is a discussion on Display Year&Month Program within the C and C++ forums, part of the Programming Talk category; Help me to write code for this program.which display year,month & day presents in a year for example. 1. no. ...

  1. #1
    Limca is offline Junior Member Array
    Join Date
    Apr 2006
    Answers
    21

    Display Year&Month Program

    Help me to write code for this program.which display year,month & day presents in a year for example.
    1. no. is 14 print 2 weeks
    2. no is 90 print 3 months
    3. no is 365 print 1 year
    user can input any no?


  2. #2
    Quozty is offline Junior Member Array
    Join Date
    Dec 2006
    Answers
    26
    the only thing I could think of is a very long winded

    CASE and Switch statement

    if < 14 days

    or something like that


  3. #3
    sammy is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    144
    You could have a function to determine the number of days and return the value to the switch case statement and take action of printing as per the result from the function.


  4. #4
    Rahulbatra is offline Senior Member Array
    Join Date
    Apr 2006
    Answers
    124
    Limca did you try the suggestions. Even if you have tried anything else do post here so that we could know how you got your result.


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...