Results 1 to 3 of 3
  1. #1
    s4rd59 is offline Member
    Join Date
    Feb 2010
    Posts
    2
    Rep Power
    0

    Default 'Bottles of Beer' project

    There is a rhyme (a bit like 'Ten Green Bottles' ) called 'Bottles of Beer' which runs thus:

    4 bottles of beer on the wall,
    4 bottles of beer,
    Take one down, pass it around (hic),
    3 bottles of beer on the wall.

    3 bottles of beer on the wall,
    3 bottles of beer,
    Take one down, pass it around (hic),
    2 bottles of beer on the wall.

    2 bottles of beer on the wall,
    2 bottles of beer,
    Take one down, pass it around (hic),
    1 bottles of beer on the wall.

    1 bottles of beer on the wall,
    1 bottles of beer,
    Take one down, pass it around (hic),
    0 bottles of beer on the wall.

    ... well apart from the slight grammatical problem. Clearly the starting number can vary.

    I need help with the following:

    -Requests the starting value for 'Bottles of Beer' . (For this question assume the user always enters a sensible value.)

    -Loops the appropriate number of times

    -Prints a verse of the rhyme in each iteration

    Thanks in advance!

  2. #2
    m00nchile is offline Senior Member
    Join Date
    Feb 2010
    Location
    Ljubljana, Slovenia
    Posts
    470
    Rep Power
    10

    Default

    Well, where exactely are you stuck, what have you done so far? Usually questions of the "here's my homework, do it for me" type don't get a lot of attention.

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    31

    Default

    Try solving each step of your problem in isolation (each of the three sentences above prepended with a hyphen). Then please feel free to come on back with your code (using code tags -- please see my signature below for details) and any specific questions you may have. Much luck!

Similar Threads

  1. need help for a project
    By megironi in forum New To Java
    Replies: 4
    Last Post: 02-07-2009, 08:28 PM
  2. open existing project project ..
    By itaipee in forum Eclipse
    Replies: 1
    Last Post: 12-28-2008, 08:12 PM
  3. Could anyone help with project?
    By billdara in forum New To Java
    Replies: 1
    Last Post: 03-12-2008, 05:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •