shell for循環篩選質數

#!/bin/bash for i in {2..100};then for j in {2..$i};then if [ $((i%j)) -eq 0 ];then break fi done if [ $i -eq $j ];then echo -n "$i" fi done
相關文章
相關標籤/搜索