#include "iostream.h"
void main()
{
int a,b,c;
c=0;
cout<<"请输入一个整数:";
cin>>a;
for (b=2;b<=a-1;b++)
{
if(a%b==0)
{cout<<"a不是素数"<<endl;
c=1;
break;}
}
if(c!=1)
cout<<"a是素数"<<endl;
}
void main()
{
int a,b,c;
c=0;
cout<<"请输入一个整数:";
cin>>a;
for (b=2;b<=a-1;b++)
{
if(a%b==0)
{cout<<"a不是素数"<<endl;
c=1;
break;}
}
if(c!=1)
cout<<"a是素数"<<endl;
}