正在加载图片...
Figure 8. 1 Sample tiNY program i sample program in tiNY language -computes factorial readx; input an integer ifo>x then( dont compute ifx<=0) fact: =1 repeat fact: =fact*X X-X until xO write fact( output factorial ofx) endsFigure 8.1 Sample TINY program: { sample program in TINY language -- computes factorial } read x ; { input an integer } if 0 > x then { don’t compute if x <= 0 } fact:=1; repeat fact:=fact*x; x:=x-1 until x=0; write fact { output factorial of x } ends
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有