input "введите размерность массивов а и в - m= ", m
print "введите элементы массивов а и в: "
for i=1 to m
input a(i), b(i)
next i
s=0
for i = 1 to m
c(i)= a(i) + b(m-i+1)
s= s+c(i)
next i
print "массив а: "
for i = 1 to m
print a(i);
next i
print
print "массив b: "
for i = 1 to m
print b(i);
next i
print
print "массив c: "
for i = 1 to m
print c(i);
next i
print
print "сумма элементов массива с ="; s
Ответ дал: Гость
var c,a,b,i,j,l: integer; begin cls;
write('введите через пробел отрезок'); read(a,b); for i: =a to b+1 do begin j: =2; l: =round(sqrt(i)); while (i mod j < > 0) and (j < = l) do begin inc(j); end; if (j > l) then begin write(c,' '); c: =i; end; end; end.
Популярные вопросы