Computer Science Canada

Algorithm Pseudocode help!

Author:  ThorGoku [ Wed Nov 06, 2013 7:36 pm ]
Post subject:  Algorithm Pseudocode help!

1. Given 100 numbers, design an algorithm, written in pseudo code, to find the smallest number among them.

2. Design an algorithm, written in pseudo code, to count the number of zeroes in the given 100 numbers.

3. Design an algorithm, written in pseudo code, to check whether a given number from a user (which is contained in a variable x) appears in the given 500 numbers.

As a small example, you have five numbers: 90, 40, 30, 100, 60 and x = 100. Your algorithm will report that x appears in the five numbers. On the other hand, if x = 70, your algorithm will report that x does not appear in the five numbers.


How is this done? I've been searching for hours and cant solve these problems! Anyone who can is much appreciated thank you!

Author:  Tony [ Wed Nov 06, 2013 8:02 pm ]
Post subject:  Re: Algorithm Pseudocode help!

ThorGoku @ Wed Nov 06, 2013 7:36 pm wrote:
I've been searching for hours...

What have you been searching for?

Author:  evildaddy911 [ Sun Nov 10, 2013 12:44 pm ]
Post subject:  RE:Algorithm Pseudocode help!

try searching for loops


: