#include <iostream> using namespace std; int main(int argc, char** argv) { int c; cout<<"请输入你要判断的数:"<<endl; system("pause"); cin>>c; if(c%2==0||c%3==0){ cout<<"这个数是合数"; }else if(c%1==0&&c%c==0){ cout<<"这个数是质数"; }else if(c==1||c==2||c==3){ cout<<"这个数是质数"; } return 0; }