Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- findOddAndEven(int N1,int a[],int N2,int b[])
- {
- int odd;
- int even;
- odd=0;
- even=0;
- for(int i=0; i<N1; i++)
- {
- if(a[i]%2=0)
- {
- even++;
- }
- else
- {
- odd++;
- }
- }
- for(int i=0; i<N2; i++)
- {
- if(b[i]%2=0)
- {
- even++;
- }
- else
- {
- odd++;
- }
- }
- cout<<even;
- cout<<" ";
- cout<<odd;
- }
- int main()
- {
- int N1;
- int a[N1];
- int N2;
- int b[N2];
- findOddAndEven(N1,a,N2,b);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement