参考代码:N=randi(100,1,50)M=N(isprime(N))M=sort(M,'descend')sum(M)某次运行结果(有随机数,每次运行结果不同):>> N=randi(100,1,50)N = Columns 1 through 9 80 81 6 41 97 42 34 64 86 Columns 10 through 18 79 54 75 74...