Tech Support > Computers & Technology > Programming > Beginniner Algorithm Question
Beginniner Algorithm Question
Posted by Ray Leon on June 28th, 2008


Dear Sirs or Madam:

I have completed what I believe to be a correct answer to an algorithm. The
orignal question was posed as an incomplete algorithm, whereas I was to
complete it and move on to a flowchart of the same. I appreciate any help.
The link to the picture is here:

http://www.popeyeray.com/algorithm.htm

Thank You,

Ray Leon
popeyeray@qwest.net


Posted by popeyerayaz on June 28th, 2008


On Jun 28, 7:04*am, "Ray Leon" <rayl...@qwest.net> wrote:
I believe I have figured out the algorithm and flowchart for A = 3, B
= 1, C = 2 but doesn't this alogrithm,and flowchart work for any
combination of three values assigned to a, b, or c?

Posted by Thad Smith on June 29th, 2008


popeyerayaz wrote:
Yes, your flowchart and pseudo-code displays the largest of any three
comparable (not complex) numbers.

I noted, however, that you don't say what the algorithm is supposed to do.
An algorithm isn't inherently correct. It specifies a procedure. In
order to know if it is correct, you need to know what the purpose of the
algorithm is. If you intended to compute the area of a triangle, the
algorithm you described is incorrect. This may seem obvious, but you must
provide the purpose if you expect good evaluation. This becomes
non-trivial as the problems become more complex. As a programmer, I spend
a lot of time specifying what the code is going to do.

An algorithm is not a question or a problem so it does not make sense to
say you have a correct answer to an algorithm.

Moral: be precise and complete when posting questions and when programming.

--
Thad


Similar Posts