Prompt a user to input the values


This task revisits Task A discussed in question One by requiring you design an algorithm to solve the game.
The Game: There is a box which contains a number of three types of object. For simplicity, let us use a triple (a, b, c) to denote the numbers of objects belonging to these three types, and assume that a ? b ? c , where a, b, and c could be any non negative integers. Each turn you are allowed to remove two objects of different types and replace them with one object of the third type. As there is no cover for the box, you can look in the box and take things out as you like.
1. Summarize the sufficient and necessary conditions for the starting configuration of the game from which we can finish with exactly one object in the box. 
2. Write an algorithm in pseudocode to carry out the following process:
a) Prompt a user to input the values of a, b, and c.
b) If the game with starting configuration (a, b, c) is solvable (i.e. (a, b, c) satisfies the above sufficient and necessary conditions), provide the user a concrete solution by showing how we can finish with exactly one object in the box. For example, if the user specifies a starting configuration as (0, 1, 2), your algorithm can output the following sequence:
(0, 1, 2) ? (1, 0, 1) ? (0, 1, 0).
Here, "? " means one move in the game by applying the rule.
c) Otherwise (i.e. if the game with starting configuration (a, b, c) is not solvable),simply output "For the given starting configuration (a, b, c), it is not possible to finish with exactly one object in the box."
3. Draw a flowchart to describe the main workload of your algorithm given in the above by using no more than 20 flowchart symbols, not including flow lines. In other words, here you could ignore the details of some parts of your algorithm,like some modules.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Prompt a user to input the values
Reference No:- TGS0130732

Expected delivery within 24 Hours