Thread: help~~~

  1. #1
    Registered User
    Join Date
    Nov 2008

    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
    Very good. Carry on soldier, and report back when you are done.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    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
    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!

    "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
    given a birthday date will display the day of the week.
    #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

    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