Program enot; const m=15; var a: array[1..m] of integer; i, j, k: integer; begin for i : = 1 to m do a[i] : = random(21)+10; for i : = 1 to m-1 do for j : = 1 to m-i do if a[j] < a[j+1] then begin k : = a[j]; a[j] : = a[j+1]; a[j+1] : = k end; write ('отсортированный массив: '); for i : = 1 to m do write (a[i]: 4); end.
italiankarest
11.09.2020
1)var a,b,i: integer; begin readln(a,b); for i: = 1 to 100 do if (i mod a< > 0) and (i mod b< > 0) then write(i,' ') end.2)var a,b,i,k: integer; begin readln(a,b); k: =0; for i: = a to b do if (i mod 7=0) xor (i mod 9=0) then k: =k+1; write(k) end.3)var pol,i,otr,a: integer; begin otr: =0; pol: =0; for i: = 1 to 10 do begin readln(a); if a> 0 then pol: =pol+1; if a< 0 then otr: =otr+1 end; if pol> otr then write('положительных больше'); if otr> pol then write('отрицательных больше') end.4) var i,a,b: integer; begin readln(a,b); for i: = a to b do if (i mod 3 =0) or (i mod 7=0) then write(i,' ',i,' ') else write(i,' ') end.