# include <iostream.h>
void main()
{
    int x;
    cout<<"please input x:\n";
    cin>>x;
    if(x==1) cout<<"1是素数";
    else
    {
    for( int i=2;i<x;i++)
        if(x%i==0)  break;
        if(x==i)        cout<<x<<"是素数";
        else          cout<<x<<"不是素数";}
}//

看越多书就发现自己越无知 于是就越想知道更多

 
											





