English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Suppose you are a given a pile of cards, 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.


how do i do this can any one advise me as to what i do or show me thank you all for your time

2007-05-07 21:43:16 · 4 answers · asked by bud1658 2 in Computers & Internet Programming & Design

4 answers

This is the code that dhvrm wanted you to see. I have fixed the missing bracket error.

You can give him the 10 points for getting the answer or give them to me for correcting him. But don't forget to give the 10 points.

2007-05-08 04:30:25 · answer #1 · answered by AnalProgrammer 7 · 2 1

Better to use a case statement, CASE Card of "Shaded Circle" do Begin Print ("Shaded Circle"); Move card to shaded circle array;End; etc ....Case End; Commands dependent on the program language you're using.

2007-05-08 05:00:28 · answer #2 · answered by Anonymous · 0 1

Normally I don't do homework verbatim, but here you go.

http://geocities.com/dhvrm/js_sort_cards.html

UPDATE:

Thank you for pointing out the missing parenthesis (not bracket), which I have changed. However, in the future, please do not plagiarize my answers.

If there's a minor coding error, simply point that out and note the point that needs correction. Suggesting that I receive best answer does not exonerate repeating my code verbatim in an answer.

Review the Community Guidelines and do not steal from me again, please.

2007-05-08 11:00:09 · answer #3 · answered by Anonymous · 0 2

Of course !!

2007-05-08 04:52:59 · answer #4 · answered by Anonymous · 0 2

fedest.com, questions and answers