Var n,d,a,h,o,max: integer; begin readln(n); d: =n div 1000; h: =(n mod 1000) div 100; a: = n mod 100 div 10 ; o: =n mod 10; if (d> h) and (d> a) and (d> o) then max: =d; if (h> d) and (h> a) and (h> o) then max: =h; if (a> d) and (h< a) and (a> o) then max: =a; if (o> d) and (h< o) and (a< o) then max: =o; if d=max then writeln(0,h,a,o); if h=max then writeln(d,0,a,o); if a=max then writeln(d,h,0,o); if o=max then writeln(d,h,a,0); end.
domtorgvl20082841
06.06.2023
Uses system; var in, out : text; line, col : integer; k : integer; begin assign(in, "nome.in"); assign(out, "nomer.out"); reset(in); rewrite(out); read(in, line, col, k); if k < col * line theb begin write(out, (k - 1) div col + 1, ' ', (k - 1) mod col + 1); end else write(out, "слишком большое число") end; close(in); close(out); end.
forosrozhkov
06.06.2023
// pascalabc.net 3.2, сборка 1338 от 16.11.2016 begin var s100: =arr('','сто','двести','триста','четыреста','пятьсот', 'шестьсот','семьсот','восемьсот','девятьсот'); var s10: =arr('','десять','двадцать','тридцать','сорок','пятьдесят', 'шестьдесят','семьдесят','восемьдесят','девяносто'); var s11: =arr('','одиннадцать','двенадцать','тринадцать','четырнадцать', 'пятнадцать','шестнадцать','семнадцать','восемнадцать', 'девятнадцать'); var s1: =arr('','один','два','три','четыре','пять','шесть', 'семь','восемь','девять'); var n: =readinteger('укажите трехзначное натуральное число'); var s: =s100[n div 100]; var n10: =(n div 10) mod 10; var n1: =n mod 10; case n10 of 0: if n1> 0 then s: =s+' '+s1[n1]; 1: if n1=0 then s: =s+' '+s10[1] else s: =s+' '+s11[n1]; else begin s: =s+' '+s10[n10]; if n1> 0 then s: =s+' '+s1[n1] end end; writeln(s) end.