we are creating a array to output intergers in increasing order, i have a problem with when the result outputs i dont want it to tell the repeated number, i think something is wrong with the functions that are bold faced. for example i input 999987654321, it will show 123456789999, it should be 123456789, so help please with three function of removing the entry......
int getNumber(){
int number (-2);
while( number < -1 || number > 100 ){
cout << "Enter a number greater than 0 and less or equal to 100 ";
cin >> number;
if ( number < -1 || number > 100 ){
cout << endl;
cout << "You did not enter a number between 0..100 inclusive." << endl;
cout << "Let's try again." << endl;
cout << endl;
}
}
return number;
}
int min ( int table[], int length){
int min(table[0]);
int i(1);
while ( i <= length){
if (table[i] < min)
min = table[i];
i = i + 1;
}
return min;
}
void swap( int table[], int i , int j ) {
int t = table[i];
table[i] = table[j];
table[j] = t;
}
void removeEntryAt( int table[], int & length, int cmPos ) {
int i(cmPos);
while ( 1 < length - 1 ){
table[i] = table[ i + 1 ];
i = i + 1;
}
length = length - 1;
}
int indexof( int table[], int length, int cmPos ) {
int i(0);
int result(i);
while( i < length && table[i] != cmPos ) {
if( i < length )
result = i;
}
return result;
}
void removeEntry( int table[], int & length, int cmPos ) {