|
|
back to boardNo subject Why my program wrong? Program T1149; Var i,n:1..200; Procedure a(p:integer); Var i,j:integer; Begin For i:=1 to p do Begin write('sin'); if i=p then Begin write('(',i,')');break;end else If odd(i) then write('(',i,'-') else write('(',i,'+'); end; end; Procedure s(n:integer); Var i,j,k:integer; Begin k:=n; For i:=1 to n-1 do write('('); For i:=1 to n-1 do Begin a(i);write('+',k-i+1,')'); End; a(n);write('+1'); end; Begin Readln(n); s(n); For i:=1 to n-1 do write(')'); Readln End. |
|
|