Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int prost_broj(int broj)
- {
- bool prost = false;
- for (int i = 2; i < broj / 2; i++)
- {
- if (broj%i == 0)
- {
- prost = false;
- }
- else if (broj%i != 0)
- {
- prost = true;
- }
- }
- if (prost)
- {
- return true;
- }
- return prost;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement