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