你自己用vb改改吧
int sushu(){
int i=0,n;
bool isFind;
for(i=2;i<1000;i++){
isFind=true;
for(n=2;n<1000;n++){
if(i!=n && i % n ==0){
isFind=false;
break;
}
}
if(isFind)
qDebug()< }
return 0;
}
Dim i As Integer
Dim j As Integer
Dim s As String
For i = 2 To 1000
For j = 2 To Int(i / 2)
If i Mod j = 0 Then
Exit For
End If
Next j
If j = Int(i / 2) + 1 Then
s = s & Str(i) & ","
End If
Next i