p1cpp Sc1 arch View Tools Options Language Buffers Hep inclu
p1cpp Sc1 arch View Tools Options Language Buffers Hep #includecstddef> // size.t for sizes and indexes III WRITE YOUR FUNCTION BELOW THIS LINE 1111I s ///////////////// WRITE VOUR FUNCTION ABOVE THIS LINE /////////////////////// .6· // These are OK after the function IlIIIIIIIII WRITE YOUR FUNCTION ABOVE THIS LINE TIT111IITiiiii #include 28 tt include
Solution
You forgot to mention what is your doubt exactly. I am assuming you need function
newSize = rindby( array, oldSize, multipleOf )
code:
int rindby( int* arr, int size, int multipleOf ){
int newSize = 0;
for(int i =0; i < size; i++){
if( arr[i]%multipleOf != 0){
arr[newSize] = arr[i];
newSize++;
}
}
return newSize;
}
