если ответ нужен в десятичной сс, то просто переведи
Ответ дал: Гость
пример программы для паскаль
program a;
const n = 50; vari: byte; b: array[1..n] of word; procedure proc(a: array of word); beginfor i: =1 to n doif((129 < = a[i]) and (a[i] < = 160)) or ((161 < = a[i]) and (a[i] < =175)) or ((225 < = a[i]) and (a[i] < = 242)) thenwriteln('index = ',i+1,'; bukva - ''',char(a[i]),'''',' a[i] = ',a[i]); end;
beginwriteln; for i: =1 to n do b[i] : = random(300); for i: =1 to n do begin write(' ',i,' = ',b[i]); if (i mod 5 = 0) then writeln; end; writeln; writeln; proc(b); readln;
end.
Ответ дал: Гость
var a: integer; c1, c2, c3, c4: integer;
begin for a : = 1000 to 9999 do begin c1 : = a div 1000; c2 : = (a div 100) mod 10; c3 : = (a div 10) mod 10; c4 : = a mod 10; if (c1 < > c2) and (c1 < > c3) and (c1 < > c4) and (c2 < > c3) and (c2 < > c4) and (c3 < > c4) then writeln(a); end; end.
Популярные вопросы