1.3-100的素数
四舍五入函数保留整数第一种方法:
clear
for n=3 to 100 step 2 ·1
    for i=2 to n/2
        if mod(n,i)=0
            exit
        endif
    endfor
    if i>n/2
        ?n
    endif
endfor
return
第二种方法:
clear
for n=3 to 100
    for i=2 to n-1
        if n/i<> int(n/i)
        else
            exit
        endif
    endfor
    if i>n-1
        ?n
    endif
endfor
第三种方法
m=3
do while m<=100
    i=2
    n=int(m/2)
    do while i<=n
        if mod(m,i)=0
            exit
        endif
        i=i+1
    enddo
    if i>n
        ?m,'是素数'
    endif
    m=m+1
enddo
第四种方法:
clear
for k=3 to 100
    f=0
    j=2
    do while f=0 and j<k
        if k%j=0
            f=1
        endif
        j=j+1
    enddo
    if f=0
        ??k
    endif
endfor
2. (4!+7!)乘以3!
clear
s=0
t=1
for i=1 to 4
    t=t*i
endfor
s=s+t
t=1
for i=1 to 7
    t=t*i
endfor
s=s+t
t=1
for i=1 to 3
    t=t*i
endfor
s=s*t
?s
return
3.1!+3!+5!+....+99!=
clear
s=1
t=1
for i=3 to 99 step 2
    t=t*i*(i-1)
    s=s+t
endfor
?' 1!+3!+5!+....+99!=',s
return
4.3!+5!+7!
s=0
t=1
for i=3 to 7 step 2
    t=t*i*(i-1)
    s=s+t
endfor
?"3!+5!+7!=",s
return
5.3!+8!+11!的和
clear
s=0
t=1
for i=1 to 3
    t=t*i
endfor
s=s+t
t=1
for i=1 to 8
    t=t*i
endfor
s=s+t
t=1
for i=1 to 11