Algorithm and Pseudocode
Algorithm and Pseudocode
AND
PSEUDOCODE
UNDERSTANDING BASICS WITH EXAMPLES
WHAT IS AN ALGORITHM?
1.Start.
2. Take an array of numbers as input.
3. Assume the first number is the largest (max = arr[0]).
4. Loop through the array from the second element to the last:
• If the current element is greater than max, update max.
5. After the loop ends, max contains the largest number.
6. Print max.
7. Stop.
CHECKING THE CHARACTERISTICS: