write pseudocode that will inform youtuber the number of "Like"(L) based on 1000 viewer

2 answers

Fthh
Here is one way to write the pseudocode for this task:

START

SET number_of_viewers = 1000
SET number_of_likes = 0

FOR i = 1 TO number_of_viewers
IF viewer[i] liked the video
number_of_likes = number_of_likes + 1
END IF
END FOR

PRINT number_of_likes

END

This pseudocode uses a loop to iterate over each viewer and check whether they liked the video. If they did, it increments the number_of_likes variable by 1. At the end, it prints the final value of number_of_likes.

This is just one way to write the pseudocode, and there are many other ways you could achieve the same result. The important thing is to communicate the steps you are taking in a clear and concise way, using the conventions of pseudocode.