1 2 3 4 5 6 7 8 9 10 | cls 1 input p input h if p=>h then goto 1 do while 1 = 1 input k if k= 3 or k=p then ? s: ? sum: end if k>h then s=s+k if h<p the sum=sum+k loop |
1 2 3 4 5 6 7 8 9 | CLS 1 INPUT p INPUT h IF p=>h THEN GOTO 1 5 INPUT k IF k= 3 OR k=p THEN ? s: ? sum: END IF k>h THEN s=s+k IF h<p the sum=sum+k goto 5 |
Тестирование выполнено в программе QB64 ( Скачать )