Бейсик
Python
DIM Ves(14) AS INTEGER
DIM i, n AS INTEGER
Ves(1) = 25: Ves(2) = 21
Ves(3) = 23: Ves(4) = 28
Ves(5) = 30: Ves(6) = 25
Ves(7) = 31: Ves(8) = 28
Ves(9) = 25: Ves(10) = 28
Ves(11) = 30: Ves(12) = 27
Ves(13) = 26: Ves(14) = 24
n = 0
FOR i = 1 TO 14
IF Ves(i) > 26 THEN
n = n + 1
ENDIF
NEXT i
PRINT n
Ves = [25, 21, 23, 28, 30, 25, 31, 28, 25, 28, 30, 27, 26, 24]
n = 0
for i in range(14):
if Ves[i] > 26:
n = n + 1
print (n)
Паскаль
Алгоритмический язык
Var i, n: integer;
Ves: array[1..14] of integer;
Begin
Ves[1] := 25; Ves[2] := 21;
Ves[3] := 23; Ves[4] := 28;
Ves[5] := 30; Ves[6] := 25;
Ves[7] := 31; Ves[8] := 28;
Ves[9] := 25; Ves[10] := 28;
Ves[11] := 30; Ves[12] := 27;
Ves[13] := 26; Ves[14] := 24;
n := 0;
for i := 1 to 14 do
if Ves[i] > 26 then
begin
n := n + 1;
end;
writeln(n);
End.
алг
нач
целтаб Ves[1:14]
цел i, n
Ves[1] := 25
Ves[2] := 21
Ves[3] := 23
Ves[4] := 28
Ves[5] := 30
Ves[6] := 25
Ves[7] := 31
Ves[8] := 28
Ves[9] := 25
Ves[10] := 28
Ves[11] := 30
Ves[12] := 27
Ves[13] := 26
Ves[14] := 24
n := 0
нц для i от 1 до 14
если Ves[i] > 26 то
n := n + 1
все
кц
вывод n
кон
С++
#include
using namespace std;
int main() {
int Ves[14] = {25, 21, 23, 28, 30, 25, 31, 28, 25, 28, 30, 27, 26, 24};
int n = 0;
for (int i = 0; i < 14; i++)
if (Ves[i] > 26) n = n + 1;
cout
return 0;