Write an equivalent procedure using MIPS instructions for thefollowing C function.
int numFunc (int array[], int arraySize)
{
int loopCount = 0;
int value = 0;
if (arraySize <= 0) return(0);
while (loopCount < arraySize)
{
array[loopCount] = loopCount * 4;
value = value + array[loopCount];
loopCount++;
}
return(value/arraySize); /* return quotient as aninteger */
}
Write an equivalent procedure using MIPS instructions for the following C function. int numFunc (int array[], int arrayS
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am