Help with simple C Programming Problem

This is a discussion on Help with simple C Programming Problem within the C Programming forums, part of the General Programming Boards category; Hey. The problem is as follows: Write program that computes the day of Easter 2005. The output shuld be in ...

  1. #1
    Registered User
    Join Date
    Mar 2006
    Posts
    1

    Question Help with simple C Programming Problem

    Hey.
    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
    Location
    Vancouver
    Posts
    2,220
    Do your own damn homework. Hope this helps.

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,420
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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


    Quzah.
    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, 01:45 AM
  3. Problem in very simple code
    By richdb in forum C Programming
    Replies: 22
    Last Post: 01-14-2006, 08: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

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