Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cout << "Wprowadz ilosc danych" << endl;
- cin >> ilosc;
- for (int i = 0; i < ilosc; i++)
- {
- //cout << "Wprowadz liczbe" << endl;
- cin >> liczba;
- int licznik_dzielnikow = 0;
- for (int j = 1; j < liczba + 1; j++)
- {
- if (liczba%j == 0)
- {
- licznik_dzielnikow++;
- }
- }
- if (licznik_dzielnikow==2)
- {
- cout << "TAK" << endl;
- }
- else
- {
- cout << "NIE" << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement