Preview

Case Problem

Good Essays
Open Document
Open Document
575 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Case Problem
CASE PROBLEM:
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

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.

Output

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

CASE PROBLEM:
Disk-O-Tec

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

You May Also Find These Documents Helpful

  • Powerful Essays

    1. The program will present a series of user screens that prompts the user for specified input.…

    • 1488 Words
    • 6 Pages
    Powerful Essays
  • Good Essays

    It/210 Final Exam

    • 1235 Words
    • 5 Pages

    1. The program will present a series of user screens that prompts the user for specified input.…

    • 1235 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    PT1420 Unit 8 Lab 8

    • 365 Words
    • 2 Pages

    Letting the User Control the Number of Iterations, page 194): Asks for Max number of students, then lists number of students by 1 till reached declared number of students.…

    • 365 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    ElizabethFlaimFP

    • 1289 Words
    • 7 Pages

    Problem Definition: Design a program that allows a user to input a list of family members, along with their age and the state where they live. The program will determine and print the average age of the user’s family. The program will also print the names of any family member that lives in Texas. The program design should also allow the user to enter at least 50 family members.…

    • 1289 Words
    • 7 Pages
    Good Essays
  • Satisfactory Essays

    It210 Appendix F

    • 372 Words
    • 3 Pages

    1. The program will present a series of user screens that prompts the user for specified input.…

    • 372 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    unit 8 homework

    • 793 Words
    • 5 Pages

    4. Design a loop that asks the user to enter a number. The loop should iterate 10 times and keep a running total of the numbers entered.…

    • 793 Words
    • 5 Pages
    Good Essays
  • Satisfactory Essays

    Write the flowchart for a program that displays the numbers 1 through 7 using a condition controlled loop (While and/or Do-While loops).…

    • 651 Words
    • 4 Pages
    Satisfactory Essays
  • Good Essays

    c. Modify the program of Part b so that at the option of the user, it displays…

    • 300 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    cmis 102 HW 2

    • 748 Words
    • 6 Pages

    Using the Hierarchical Design, I am creating a flow chart or blueprint of how basically this program will work:…

    • 748 Words
    • 6 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Lab 3 Student

    • 1264 Words
    • 7 Pages

    Step 4: Write the exact output you would expect from the following line of code if the user of the program enters a name of Nolan Owens and they have taken 20 credits so far. (Reference: Displaying Items, page 40 – 41).…

    • 1264 Words
    • 7 Pages
    Satisfactory Essays
  • Good Essays

    Curriculum Guides

    • 3978 Words
    • 16 Pages

    Listen for a certain sound in a word. If the sound is in the beginning of the word place the counter in the first box, middle of the word place it in the middle box, end of the word place the counter in the last box.…

    • 3978 Words
    • 16 Pages
    Good Essays
  • Good Essays

    Peer Evaluation

    • 462 Words
    • 2 Pages

    B. Count the number of lines on which names are listed (e.g., 4, 5, 6, etc.)…

    • 462 Words
    • 2 Pages
    Good Essays
  • Satisfactory Essays

    Stategic Group Mapping

    • 311 Words
    • 2 Pages

    Take the top five other players in your strategic group. List them. Develop a profile for each:…

    • 311 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    * The counter can enable either the top counting mode or the down counting mode between the numbers lies between two limits of 00 to 99.…

    • 3471 Words
    • 14 Pages
    Powerful Essays
  • Satisfactory Essays

    Case Questions

    • 674 Words
    • 3 Pages

    1. How is the policy portfolio of Harvard determined? What are the three major asset classes in the portfolio as of May 1999? Internally, by the HMC. The Board of the corp determined the Pol Port, but the mgmt. was permitted to make short-run decisions within certain constraints. HMC, considered 3 things when looking at asset classes: expected future rel returns, volatility of real returns, and the correlation of the real return on each asset class w/ the real return on all other asset classes.…

    • 674 Words
    • 3 Pages
    Satisfactory Essays