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