Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
Algorithm Pseudocode help!
Author Message
ThorGoku

Posted: 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

Tony

Posted: 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?
Tony's programming blog. DWITE - a programming contest.
evildaddy911

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

try searching for loops
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 3 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: