จงเขียนโปรแกรมหาผลรวมจำนวน i ถึง n ด้วย while
Start
Set i=0,n=0,sum=0
Input i
Input n
While (i<=n)
Compute sum=sum+i
Increase i
Endwhile
print sum
stop
เขียนโปรแกรมหาแฟกทอเรียลของจำนวน n ด้วย for
Start
Set i=1,n=0,fac=1
Input n
for i to n do
Compute fac=fac*i
Endfor
Print fac
stop