Guest User

Untitled

a guest
Mar 26th, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int suma_tablic,liczba,i=0,j,wskaznik;
  4. int main()
  5. {
  6. cin>>suma_tablic;
  7. for(i; i<suma_tablic; i++)
  8. {
  9. cin>>liczba;
  10. wskaznik=0;
  11. if(liczba<=1)
  12. wskaznik++;
  13. for(j=1; j<=liczba/2; j++)
  14. if(liczba%j==0 && j!=1)
  15. wskaznik++;
  16. if(wskaznik==0)
  17. cout<<"TAK" <<endl;
  18. else
  19. cout<<"NIE" <<endl;
  20. }
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment