Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int t, s, liczba;
- int main()
- {
- cin>>t;
- for(int i=1; i<=t; i++)
- {
- cin>>liczba;
- if(liczba <= 2)
- {
- cout<<"NIE"<<endl;
- }
- else
- {
- for(int j=2; j<liczba; j++)
- {
- s = liczba % j;
- if(s==0)
- {
- cout<<"NIE"<<endl;
- break;
- }
- }
- if(s!=0)
- {
- cout<<"TAK"<<endl;
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement