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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started