|
|
вернуться в форумprogram sinus; var i,n,depth:integer; procedure calc(i:integer); var j:integer; begin if i=depth+1 then for j:=1 to depth do write(')') else begin write('sin(',i); if i<depth then if odd(i) then write('-') else write('+'); calc(i+1); end; end; begin readln(n); for i:=1 to n-1 do write('('); for i:=1 to n-1 do begin depth:=i; calc(1); write('+',n-i+1,')'); end; depth:=n; calc(1); writeln('+1'); end. |
|
|