SUBMISSION+RUIHAO

Enter your submission for both Challenges here. Make sure your label your solutions clearly. Do not have compiler (cross finger) Try my best. TYTY

Challenge 1 code format="cpp-qt"
 * 1) include

int main{ using namespace std;

int Tables[10]={-1,0,1,2,3,4,5,6,7,8}; //assuming that this is the supposed value (cos i don't understand the given one in red)// int arrayMaximum=Tables[0]; int arrayMinimum=Tables[0]; int total=0; int arrayAverage=0; int a;//to store value for searches// int occurrence=0; int reverse[10];

//searches for maximum for(int i=0;i<10;i++){ if(Tables[i]>Tables[i+1]){//loop to compare 2 values// if(Tables[i]>=arrayMaximum)arrayMaximum=Tables[i]; } } cout<< "The Maximum is: "; for(int i=0; i<10; i++) { cout << Tables[i]; }

//searches for minimum for(int i=0;i<10;i++){ if(Tables[i]>a; for(int i=0;i<10;i++){ if(a==Tables[i])occurrence++; } cout<<"Number of times"<< a << "occurs is: "< Allocations[j+1]) { tmp = Allocations[j+1]; Allocations[j+1] = Allocations[j]; Allocations[j] = tmp; }       }

}

cout << "Arranged in ascending order: "; for(int i=0; i<5; i++) { cout << Allocations[i]; }

return 0; }

code