help~~~

This is a discussion on help~~~ within the C++ Programming forums, part of the General Programming Boards category; given a birthday date will display the day of the week. It will receive a number then receive the birthday ...

  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    1

    Exclamation help~~~

    given a birthday date will display the day of the week.
    It will receive a number then receive the birthday date and return the day of the week then display how many birthday dates fall on each day of the week.


    need a formula to calculate the day of the week for December 31 of the previous year.
    Day 0: Sunday
    Day 1: Monday
    Day 2: Tuesday
    Day 3: Wednesday
    Day 4: Thursday
    Day 5: Friday
    Day 6: Saturday


    Use switch statement to make this calculation.

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,636
    Very good. Carry on soldier, and report back when you are done.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Use a subject of "help": Check
    Use lots of weird symbols in the subject: Check
    Post an assignment text without any sign of an attempt at solving it: Check

    Hasn't read the forum rules: CHECK
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #4
    Kiss the monkey. CodeMonkey's Avatar
    Join Date
    Sep 2001
    Posts
    902
    given a birthday date will display the day of the week.
    Code:
    #include <iostream>
    int main()
    {
       std::cin.get(/*bithday date*/);
       std::cout << "Wednesday!" << std::endl;
    }
    //plz gimme g00d gradZ
    "If you tell the truth, you don't have to remember anything"
    -Mark Twain

  5. #5
    The larch
    Join Date
    May 2006
    Posts
    3,573
    Brillant!

    A person is bound to have a birthday on Wednesday sooner or later (if they live long enough...)
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

Popular pages Recent additions subscribe to a feed

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