1//given the fact that it takes n of number
2void sumEvenAndOdd(){
3int n=0 , evenSum=0 , oddSum=0;
4 int numbers[Size];
5 cout<<"enters the number(N) of integers\n";
6 cin>>Size;
7
8 cout<<"Enter "<<Size<<" number/s:\n";
9 for(int i =0 ;i< Size ; ++i){
10 cin>>numbers[i];
11 }
12 for(int i =0 ;i<Size ; ++i){
13 if(numbers[i]%2 ==0){
14 evenSum += numbers[i];
15 }
16 else{
17 oddSum += numbers[i];
18 }
19 }
20 cout<<"the sum of even numbers is : "<<evenSum <<"\nthe sum of odd numbers is :"<<oddSum<<endl;
21}