Помогите решить задачу на Basic. В ответах: 1, а у меня получается 2.

DIM Mas(7) AS INTEGER
Mas(1) = 10: Mas(2) = 5
Mas(3) = 7: Mas(4) = 3
Mas(5) = 9: Mas(6) = 2
Mas(7) = 4
k = 0: m = 2
FOR i = 2 TO 7
IF Mas(i) - Mas(i - 1) > m THEN
k = k + 1
END IF
NEXT i
PRINT k
Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Copyright © 2024 SCHOLAR.TIPS - All rights reserved.