Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. findOddAndEven(int N1,int a[],int N2,int b[])
  4. {
  5. int odd;
  6. int even;
  7. odd=0;
  8. even=0;
  9. for(int i=0; i<N1; i++)
  10. {
  11. if(a[i]%2=0)
  12. {
  13. even++;
  14. }
  15. else
  16. {
  17. odd++;
  18. }
  19. }
  20. for(int i=0; i<N2; i++)
  21. {
  22. if(b[i]%2=0)
  23. {
  24. even++;
  25. }
  26. else
  27. {
  28. odd++;
  29. }
  30. }
  31. cout<<even;
  32. cout<<" ";
  33. cout<<odd;
  34. }
  35. int main()
  36. {
  37. int N1;
  38. int a[N1];
  39. int N2;
  40. int b[N2];
  41. findOddAndEven(N1,a,N2,b);
  42. return 0;
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement