Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int n,c=0;
- int main()
- {
- cin>>n;
- for(int i=1;i<=sqrt(n);i++)
- {
- if(n%i==0)c++;
- }
- if(c==2)cout<<"prime";
- else cout<<"composite";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement