Question: Modify this sample to include a class that is called MyArray. You need to put the sorting code into this class. For example, move the
Modify this sample to include a class that is called MyArray. You need to put the sorting code into this class. For example, move the execution code (the sorting part) from main() to the class MyArray.
#include
int A[]={3,1,-2,5,9,-100,6,7,35,20};
int main() { int i,j; int n=10; for (j=n-1;j>0;j--){ // this is not a full-bubble-sort; can be improved for (i=0;i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
