Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /******************************************************************************
- Online C++ Compiler.
- Code, Compile, Run and Debug C++ program online.
- Write your code in this editor and press "Run" button to compile and execute it.
- *******************************************************************************/
- #include <stdio.h>
- bool czyParzysta(int);
- int main()
- {
- int sizeA=10;
- int A[sizeA]={5, 99, 3, 7, 111, 13, 4, 24, 4, 8};
- int result;
- for(int i=0;i<sizeA;i++){
- if(czyParzysta(A[i])){
- result=A[i];
- break;
- }
- }
- printf("Wynik: %d",result);
- return 0;
- }
- bool czyParzysta(int n){
- if(n%2==0)
- return true;
- else
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement