Thread: Help with simple C Programming Problem

  1. #1
    Registered User
    Join Date
    Mar 2006

    Question Help with simple C Programming Problem

    The problem is as follows:
    Write program that computes the day of Easter 2005.
    The output shuld be in the form of
    Month m, Day n

    Where m is the moth number (3 for march, 4 for april) and n is the in the month. The date for easter sunday is march(22+a+b)

    a=(19c+24) remainder 30
    b=(2d + 4e + 6a + 5) remainder 7
    c= year remainder 19
    d= remainder 4
    e= year remainder 7

    If (22 + a + b) is greater that 31, the date is april.
    You will need to do a division and a remainder to correct for this.
    Needs to work for other years 1991, 1997 and 2018.

    IF function cannot be used.

    Thanks for any help.

  2. #2
    Registered User
    Join Date
    Jan 2002
    Do your own damn homework. Hope this helps.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Or more specifically, show us what you can do yourself, and the specific bit which you're stuck on.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    More more specifically, stop PM-ing me to help you do your homework.

    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. A simple file I/O problem
    By eecoder in forum C Programming
    Replies: 10
    Last Post: 10-16-2010, 11:00 PM
  2. Problem in simple code.
    By richdb in forum C Programming
    Replies: 6
    Last Post: 03-20-2006, 02:45 AM
  3. Problem in very simple code
    By richdb in forum C Programming
    Replies: 22
    Last Post: 01-14-2006, 09:10 PM
  4. Simple Initialization Problem
    By PsyK in forum C++ Programming
    Replies: 7
    Last Post: 04-30-2004, 07:37 PM
  5. Simple OO Problem
    By bstempi in forum C++ Programming
    Replies: 1
    Last Post: 04-30-2004, 05:33 PM