a=50:100;
a(~isprime(a)) % isprime判断是否为素数,此式表示返回a中的非素数,即合数
ans =
Columns 1 through 11
50 51 52 54 55 56 57 58 60 62 63
Columns 12 through 22
64 65 66 68 69 70 72 74 75 76 77
Columns 23 through 33
78 80 81 82 84 85 86 87 88 90 91
Columns 34 through 41
92 93 94 95 96 98 99 100
factorial(100)
望采纳