How this can be done?,a problem with pseudo code in larp

START

WRITE “Enter the mark of student no.1”
READ Mark1
WRITE “Enter the mark of student no.2”
READ Mark2
WRITE “Enter the mark of student no.3”
READ Mark3

IF Mark1<Mark2 THEN
IF Mark1<Mark3 THEN
WRITE “Mark of student no.1 is the smallest mark.”

ELSE IF Mark2<Mark1 THEN
IF Mark2<Mark3 THEN
WRITE “Mark of student no.2 is the smallest mark.”

ELSE IF Mark3<Mark1 THEN
IF Mark3<Mark2 THEN
WRITE “Mark of student no.3 is the smallest mark.”
ENDIF

END

Hey! I suggest taking a look here: IF-ELSE-IF structure for some examples of what you should be doing. It looks like that “END” command is not necessary.

See here: http://larp.marcolavoie.ca/en/Files/LarpEnV3.pdf for reference and specifically chapter 9 on conditionals.

1 Like

the error was that you should end evry if statement like this:

1 Like