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