求一个素数,结果出问题了。

#include<iostream> using namespace std; bool sushu(int s) { int aa=1; while (1) { aa++; if (aa==s) { return false; break; } else if (s%aa==0) { break; } } return true; } int main() { int ss; cin >> ss; if (sushu(ss)) { cout << "是素数"; } else { cout << "不是素数"; } return 0; }