each of which shows one
of the following four shapes: square or circle, shaded or unshaded. You can assume these are the only possibilities.
Write a set of instructions using while loop and if...else
selection structures to sort the pile of cards according to the
symbols they display and write an appropriate message for each
card, for example 'shaded circle' or 'unshaded square'. Each
message should be on a new line.
In your answer you should use indentation to help make the
structure of the algorithm clear. please help!!!! i have been trying to figure this out for days and don't even know where to start. Much appreciated. *plz note that we have to write instructions and not the actual program.
2007-05-10
22:01:37
·
1 answers
·
asked by
Anonymous
in
Computers & Internet
➔ Programming & Design
The instructions should look something like this:
(The shape is filled in) AND (The shape is square)
(a) (b) (c) (d)
(a)
(The shape is filled in) true
AND AND false
(The shape is square) false
The condition is false.
(b)
(The shape is filled in) true
AND AND
(The shape is square) true
true
The condition is true.
(c)
(The shape is filled in) false
AND AND false
(The shape is square) true
The condition is false.
(d)
(The shape is filled in) false
AND AND false
(The shape is square) false
The condition is false.
75
2007-05-10
22:19:13 ·
update #1