#include <iostream>using namespace Std;int main () {int a[10]={1,2,3,4,5,6,7,8,9,10},b[10],c[10],i=0,j=0,k=0; for (i=0;i<10;i++) {if (a[i]%2!=0) {b[j]=a[i];cout<< "Odd Group is" <<b[j]<<endl;j++;} else {c[k]=a[i];cout<< "Even group is" <<c[k]<<endl; k++;}} return 0;}
#include <iostream>using namespace Std;int main () {int a[10],i=0,max=0,min=0,sum=0,j=0,k=1,m=0,n=0;double average=0;cout<< "Please enter the scores of 10 students (between 0 and 100)" <<endl;for (i=0;i<10;i++) {cin>>a[i];} Max=a[0];min=a[0];for (i=1;i<10;i++) {if (A[i]>max) max=a[i];if (a[i]<min) min=a[i];} cout<< "The highest score for the" <<max<<endl;cout<< "score is lowest for" <<min<<endl;for (i=1;i<10;i++) { if (Max==a[i]) {j=j+1;m=i;} cout<< "The numbers of the students with the highest score are" <<M<<ENDL;} for (i=1;i<10;i++) {if (Min==a[i]) {k++;n=i;} cout<< "The numbers of the students with the highest score are" <<M<<ENDL;} cout<< "The students with the highest score" <<j<< "<<endl;cout<<" score the lowest students have "<<k<<" <<endl; for (i=0;i<10;i++) {sum=sum+a[i];} average=sum/10.0;cout<< "mean value" <<average<<endl; return 0;}
#include <iostream>using namespace Std;int main () {int a[10]={1,2,3,3,5,6,7,8,9,10},i=0;cout<< defined initial array a[ 10]={1,2,3,3,5,6,7,8,9,10} "<<endl;cout<<" The new Array is "<<endl;for (i=0;i<10;i++) {if (a[i]==3) {for (i =2;i<9;i++) a[i]=a[i+2];}} for (i=0;i<8;i++) {cout<<a[i];} return 0;}
C + + job 5, array separation, score, array selection