INPUT "vvedite p ", p
INPUT "vvedite h ", h
WHILE (a <> p) AND (a <> h)
INPUT "vvedite chislo ", a
IF a > h THEN s1 = s1 + a
IF a < p THEN s2 = s2 + a
WEND
PRINT "summa >h "; s1
PRINT "summa <p "; s2
INPUT "vvedite p ", p
INPUT "vvedite h ", h
WHILE (a <> p) AND (a <> h)
INPUT "vvedite chislo ", a
IF a > h THEN s1 = s1 + a
IF a < p THEN s2 = s2 + a
WEND
PRINT "summa >h "; s1
PRINT "summa <p "; s2