Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int* filling_array()
- {
- int arr_size;
- cout<<"Enter the size of the array"<<endl<<">";
- cin>>arr_size;
- int* arr1 = new int[arr_size];
- for(int counter = 0; counter < arr_size; counter++)
- {
- cout<<counter+1<<" element:"<<endl;
- cin>>arr1[counter];
- }
- return arr1;
- }
- bool is_simple(float n)
- {
- if (n/2.0==0){return 0;}
- for(int counter = 3; counter = n-1; counter+2)
- {
- if(n/counter==0){return 0;}
- }
- return 1;
- }
- int main()
- {
- cout<<is_simple(10);
- filling_array();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement