программа в qbasic: dim n as integer, i as integer, j as integer randomize timer n = int(rnd * 91) + 10 dim a(1 to n) as integer, b(1 to n) as integer print "дан одномерный массив: " j = 0 for i = 1 to n a(i) = int(rnd * 199) - 99 print using "####"; a(i); if a(i) mod 2 = 0 then j = j + 1 b(j) = a(i) end if next print if j = 0 then print "все числа нечётныe" else print "cформированный массив: " for i = 1 to j print using "####"; b(i); next end if end
Поделитесь своими знаниями, ответьте на вопрос:
ты не указал язык на котором написать, c++?