Case Problem

Topics: Number, Decision making, President Pages: 3 (575 words) Published: February 22, 2013
President’s Advisors

President gets advice from his pool of advisers every time he needs to make a decision. He has 13 top advisers that he really relies on. But if all of them are involved in any decision, they always end up in an argument where more often than not, the final decision is not achieved. To resolve this, a scheme was devised where only 5 of the 13 will be randomly chosen to decide on a certain matter.

They achieved this by having the 13 advisers arrange themselves in a circle. The President can start counting from a certain adviser with an appropriate counting interval. For example, he can start counting from adviser 1 with a counting interval of 4. Then the first adviser counter out will be adviser 4, followed by advisers 8, 12, 3 and 9. Note that those advisers who are already counted out will not be counted again.

Write a program that would ask which adviser to start from and ask the counting interval. Then, it should display which advisers were selected.


Input to the program will be 2 integers. The first integer is the starting adviser, which can range from 1 to 13. The second is the counting interval, which can range from 1 to 100. Repeat the program until the user enters 0 as the starting adviser.


Display the advisers which were selected in the order that they were selected each separated by a comma and a space.

Sample Output

Start: 5
Interval: 5

Chosen Advisers: 9, 1, 6, 12, 5

Start: 1
Interval: 14

Chosen Advisers: 1, 3, 6, 10, 4


You, and two friends, have been hired by a computer firm to clean up their office of all their unused diskettes. These are hidden in various desk drawers and must be collected together into a large pile. As a reward these diskettes are to be divided up equally between you and your friends to take home. How many diskettes were there to start with if the following is true? (There is more...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Case Management Essay
  • Essay about Kensington Tablet Cases Make Holiday Shopping a Snap
  • Essay about Case Study Worksheet GE
  • Diversity Makes Good Business Case Essay
  • Making the Business Case: Multiple Choice Questions Essay
  • Just for Feet Audit Case 5-7 Essay
  • ACTBAS2 INDIVIDUAL BUSINESS CASE (“Goodwill Stores”) 3rd Term, Academic Year 2011-2012 Source: Weygandt, J., Kieso, D., and Kimmel, P....
  • Essay on Ethics Case

Become a StudyMode Member

Sign Up - It's Free