[[email protected] wyb]# cat 9zhishu.sh #!/bin/bash for i in `seq 100` do for((j=2;j<=i-1;j++)) do [ $((i%j)) -eq 0 ] && break done [ $j -eq $i ] && echo $i done [[email protected] wyb]# bash 9zhishu.sh 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 [[email protected] wyb]#
时间: 2024-10-05 05:50:09