SUBMISSION+JOSHUA

Challenge 1

code format="cpp"
 * 1) include

int main{ using namespace std;

int tables[10]={88,44,-21,0,23,8,-34}; int arrLength = 7; int reversedTables[10];

int arrMax=tables[0]; int arrMin=tables[0]; int arrTotal=0; int arrAverage=0; int searchNum;

//Find max for(int i=0; i tables[i+1]) { if (tables[i] >= arrMax) arrMax = tables[i]; }   }

//Find min for(int i=0; i<arrLength; i++) { if(tables[i] < tables[i-1]) { if (tables[i] <= arrMin) arrMin = tables[i]; }   }

//Find average for(int i=0; i<arrLength; i++) { arrTotal += tables[i]; }   arrAverage = arrTotal/arrLength;

//Reverses order for(int i=0; i> searchNum; for(int i=0; i<arrLength; i++) { if(tables[i] == searchNum) searchCount++; }       cout << "Number of times the number " << searchNum <<" appeared: " << searchCount << endl; }

return 1; } code

Challenge 2

Capital letters come first before small letters, as small letters have a larger value. code format="cpp"
 * 1) include

int main{ using namespace std;

char Allocations[5] = {'z','v','E','a','b'}; char tempSwap;

int arrLength = sizeof(Allocations);

//outputs original array cout << "Array in original order: "; for(int i=0; i0; i--) { for(int r=0; r Allocations[r+1]) { tempSwap = Allocations[r+1]; Allocations[r+1] = Allocations[r]; Allocations[r] = tempSwap; }       }

}

//outputs arranged array cout << "Arranged in ascending order: "; for(int i=0; i<arrLength; i++) { cout << Allocations[i]; if (i != (arrLength-1)) cout << ","; }

cin.get; return 1; } code