Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Count out program

  1. #1
    Member
    Join Date
    Jun 2014
    Posts
    65
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Count out program

    The children’s game of ‘count-out’ is played as follows: n children (numbered 1 to
    n) are arranged in a circle. A sentence consisting of m words2 is used to eliminate
    one child at a time until one child is left. Starting at child 1, the children are
    counted from 1 to m and the mth child is eliminated. Starting with the child after
    the one just eliminated, the children are again counted from 1 to m and the mth
    child eliminated. This is repeated until one child is left. Counting is done circularly
    and eliminated children are not counted. Write a program to read values for n
    (assumed <= 100) and m (> 0) and print the number of the last remaining child.

    Any ideas anyone?


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Count out program

    Duplicate thread closed.

Similar Threads

  1. Count out program-- How do i do this?
    By javaman1 in forum What's Wrong With My Code?
    Replies: 43
    Last Post: June 22nd, 2014, 05:01 PM
  2. Java program to count External devices connected with the system. Eg. Pen drive
    By arindam.mukherjee007 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: August 29th, 2013, 08:34 AM
  3. Column count doesn't match value count at row 1
    By Tyluur in forum What's Wrong With My Code?
    Replies: 1
    Last Post: December 30th, 2012, 01:31 AM
  4. How to Count the CAPS
    By Sean137 in forum Java Theory & Questions
    Replies: 1
    Last Post: December 14th, 2010, 08:30 AM
  5. Sentence and Letter Count Program
    By velop in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 10th, 2010, 12:10 AM