давно
Старший Модератор
31795
6196
<font color=blue>Const N:set of byte=[2,3,5];Var a,b,c,d:integer; z:boolean;{вариант с функцией которая разбирает множители и выводит числоfunction Check(d:integer;e:boolean):boolean; var c:integer; z:boolean; begin c:=2; if e then write(d:4,‘:=‘); if not(d in N)then repeat if c in N then begin z:=(d mod c)=0; if z then begin d:=d div c; if e then write(c:2,‘ *‘); end; end; inc(c,ord(not(z))); until (c>5) or(d in N); if e then writeln(d:2); check:=d in N; end; }Begin write(‘N:‘);readln(a); {начальное значение} b:=2; repeat {вариант без фцнкций} z:=true; d:=b; c:=2; if not(b in N)then repeat if c in n then begin z:=(d mod c)=0; if z then d:=d div c; end; inc(c,ord(not(z))); until (c>5) or(d in N);{для варианта в функцией dec(a,ord(Check(b,check(b,false)))); } {вариант без функции} if z then begin write(b:6,‘:=‘); d:=b; c:=2; if not(d in N) then repeat z:=(d mod c)=0; if z then begin write(c:2,‘ *‘); d:=d div c; end; inc(c,ord(not(z))); until (c>5)or(d in N); if d in N then writeln(d:2); dec(a); end; {следующее число } inc(b); until a=0; end.</font>
Об авторе:
Мне безразлично, что Вы думаете о обо мне, но я рад за Вас - Вы начали думать.