Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Algorithm Pseudocode help!
Index -> General Discussion
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ThorGoku




PostPosted: 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!
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: 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?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
evildaddy911




PostPosted: Sun Nov 10, 2013 12:44 pm   Post subject: RE:Algorithm Pseudocode help!

try searching for loops
Display posts from previous:   
   Index -> General Discussion
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: