pseudocode

Write your question here.
Write a pseudocode for selecting the largest positive number ( greater than zero ) from a set of N positive numbers. # value of N is known in advance.
Please note that this is not a homework site. We won't do your homework for you. The purpose of homework is that you learn by doing. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.

We didn't see your attempts to solve this problem yourself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again.
i have try it but am not sure if it's correct

START
take N to be {1 3 4 2}

STEP 1
Input all numbers in set N where N= {1 3 4 2}

STEP 2
Arrange the numbers in descending order, 1 2 3 4

STEP 3
Select the first number: the largest among all

STEP 4
Print largest

END
am trying to place them in c++

count f0
sum f0
largest f0

INPUT number
WHILE number <> 0 DO
sum fsum + number
count fcount + 1

IF number > largest THEN
largest fnumber
END IF

PRINT “Enter a positive integer, zero to end input”

INPUT number
END WHILE
average fsum / count
PRINT “Average is”, average; “Largest integer is”, largest

Stay on target, Luke!

No input, no sum, no average. Just select a number (somehow) from already existing set of numbers.
Thanks man
Topic archived. No new replies allowed.