Latest
Loading...

Python for Ethical Hacking

Command Prompt

Featured Post

#5 Jarvis

Jarvis      Now we are going to create some functions. With the help of this functions we are going to make our Play music Open website...

Find Minimum in a list || Programming basics

Find Minimum in a list || Programming basics

Find Minimum in a list

            In this post we are going to see about how to write algorithm, flowchat and pseudocode find minimum in a list 

 Algorithm

Step 1: Start

Step 2: Declare a list of numbers, i, min

Step 3: Read the list of numbers

Step 4: Initialize the variable min               list[0]

Step 5: For each number i in the list, compare i to min

5.1: if i <min then set min               i

Step 6: Display min

Step 7: Stop


Flowchart





Pseudocode

READ list of numbers

INITIALIZE min with the first element of the list

FOR each number in the list

IF number is lesser than min THEN

SET min to number

ENDIF

ENDFOR

DISPLAY min as minimum value






No comments:

Post a Comment