Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
2071 | zjchen | 1 | !goto $wims_read_parm |
2 | |||
3 | :def |
||
4 | title=Factorial |
||
5 | input=integer |
||
6 | !exit |
||
7 | |||
8 | :proc |
||
9 | result=!exec pari print(($formula)!); |
||
10 | test=!varlist $formula |
||
11 | !exit |
||
12 | |||
13 | :output |
||
14 | |||
15 | Factorial: |
||
16 | !if + isin $formula or - isin $formula or * isin $formula or / isin $formula or \ |
||
17 | ^ isin $formula or $test!=$empty |
||
18 | !htmlmath ($formula)! |
||
19 | !else |
||
20 | !htmlmath $formula! |
||
21 | !endif |
||
22 | = |
||
23 | !insmath $result |
||
24 | . |
||
25 | !exit |
||
26 |