//输出50-100的素数并求和
public class Primenumber {
public static void main(String[] args) {
int i, x, sum =0;
for (i =50; i <=100; i++) {
for (x =2; x <= i /2; x++) {
if (i % x ==0)
break;
}
if (x > i /2) {
System.out.println(i);
sum = sum + i;
}
}
System.out.println("sum" +"=" + sum);
}
}