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