Given an array of sixe n write a program to rearrange the numbers of the array in such a way that even and odd numbers are arranged alternatively in increasing order
Answers
Answered by
0
...?..??...??. what is the question
Answered by
3
#include<iostream.h>
#inckude<conio.h>
Void main ()
{
Clrscr () ;
Int arr[5];
Int sum;
Cout<<"Enter any five integer number : :" ;
for(int i=0;i<5;i++)
{
Cin>>arr[i];
}
sum=0;
for(i=0;i<5;i++)
{
sum =sum+arr[i] ;
}
Cout<<"The sum of the array elements is : :" <<Sum;
getch () ;
}
#inckude<conio.h>
Void main ()
{
Clrscr () ;
Int arr[5];
Int sum;
Cout<<"Enter any five integer number : :" ;
for(int i=0;i<5;i++)
{
Cin>>arr[i];
}
sum=0;
for(i=0;i<5;i++)
{
sum =sum+arr[i] ;
}
Cout<<"The sum of the array elements is : :" <<Sum;
getch () ;
}
Similar questions