Var a: string; c: array['0'..'9'] of integer; i: integer; begin write('введите натуральное число: '); readln(a); for i: = 1 to length(a) do if ('0'< =a[i])and(a[i]< ='9') then c[a[i]]: =c[a[i]]+1; for i: = 1 to c['9'] do write('9 '); for i: = 1 to c['6'] do write('6 '); for i: = 1 to c['3'] do write('3 '); writeln; for i: = 1 to c['0'] do write('0 '); for i: = 1 to c['2'] do write('2 '); for i: = 1 to c['4'] do write('4 '); for i: = 1 to c['6'] do write('6 '); for i: = 1 to c['8'] do write('8 '); end. введите натуральное число: 59012549703651409725190351902745210974651094251087498015794801574801974850197423 9 9 9 9 9 9 9 9 9 9 9 6 6 3 3 3 0 0 0 0 0 0 0 0 0 0 0 0 2 2 2 2 2 2 4 4 4 4 4 4 4 4 4 4 6 6 8 8 8 8 8
Ляпунов_Владмирович
02.09.2020
1) program kr3sum; var i,s.h: integer; begin read(k) //кол чисел for i: =1 to k do begin read(h) //число для действий if h mod 3 = 0 then begin s: =s+1; end; writeln(s); end. 2) program jeje; var k,i,m,s,h: integer; begin m: =0; read(k); //кол-во чисел for i: =1 to k do begin readln(h); if h mod 10 = 4 then begin s: =h; if s > m then m: =s end; end; write(m); end.