|
|
back to boardWhat's wrong with my program? Posted by Temp 1 Jul 2002 06:14 Program P1149; Var Temp,N:Integer; Procedure A(Num:Integer); Var Temp:Integer; Begin For Temp:=1 To Num Do Begin Write('sin('); If Temp=Num Then Write(Num,')') Else If Temp=1 Then Write(Temp,'-') Else Write(Temp,'+'); End; For Temp:=1 To Num-1 Do Write(')'); End; Begin Readln(N); For Temp:=1 To N-1 Do Write('('); For Temp:=1 To N Do Begin A(Temp); Write('+',N-Temp+1); If Temp<>N Then Write(')'); End; End. if odd(temp) then write('-') else write('+') |
|
|