about case

plssss,,,help me for my subject its was so very hard to me to learn about this ,,because i dont now how to create a program that will accepts dates written in numerical form and then output them as complete form....


for example:

input: ---> 2 26 2007

output: --->february 26 2007


thats the problem that i won't have to be finished this day,,,
plssss,,,,help me


Im Michael Bryan C. Remillo,,,,asking for your reply

Comments

  • [b][red]This message was edited by MT2002 at 2007-2-28 20:57:27[/red][/b][hr]

    : plssss,,,help me for my subject its was so very hard to me to learn about this ,,because i dont now how to create a program that will accepts dates written in numerical form and then output them as complete form....
    :
    :
    : for example:
    :
    : input: ---> 2 26 2007
    :
    : output: --->february 26 2007
    :
    :
    : thats the problem that i won't have to be finished this day,,,
    : plssss,,,,help me
    :
    :
    : Im Michael Bryan C. Remillo,,,,asking for your reply
    :
    [blue]
    Something like this?[/blue][code]
    #include

    unsigned int iMonth=0; // contians month in numerical form
    std::string strMonth; // string for month

    // in main() (or whatever routine):
    switch (iMonth) {

    case 1: strMonth = "Janurary"; break;
    case 2: strMonth = "Feburary"; break;
    case 3: strMonth = "March"; break;
    // etc..

    default: strMonth = "Unkown"; break;
    };[/code][blue]
    strMonth is a string containing the month. (It will be "Unkown"
    if an invalid month)

    Coinsidering this is homework, see if you can finish adding
    the other months (4...12)

    Hope this helps, and good luck;[/blue]






Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion