#include<iostream>
#include<iomanip>
using namespace std;
class acm
{
public:
void sushu(int a,int b)
{
for(i=1;i<a;i++)
{
if(a%i==0)
{
b++;
}
}
if(b==1)
cout<<"prime"<<endl;
else
cout<<"not prime"<<endl;
}
private:
int a,i,b=0;
};
int main()
{
acm d;
int a,b=0;
cin>>a;
d.sushu(a,b);
}
0.0分
1 人评分
C语言程序设计教程(第三版)课后习题1.6 (C++代码)浏览:902 |
C语言程序设计教程(第三版)课后习题5.7 (C语言代码)浏览:596 |
C语言训练-大、小写问题 (C语言代码)浏览:614 |
C语言程序设计教程(第三版)课后习题6.3 (C++代码)浏览:963 |
字符逆序 (C语言代码)浏览:646 |
字符逆序 (C语言代码)浏览:617 |
C二级辅导-计负均正 (C语言代码)浏览:482 |
C语言程序设计教程(第三版)课后习题12.3 (C语言代码)浏览:548 |
C语言程序设计教程(第三版)课后习题7.5 (C语言代码)浏览:555 |
逆反的01串 (C语言代码)浏览:1445 |