Question: Please help me convert this C program to RISC V assembly. int main(void) { int array[100]; int result[98]; int total = 0; for (int i
Please help me convert this C program to RISC V assembly.
int main(void) {
int array[100];
int result[98];
int total = 0;
for (int i = 0; i <100; i++){
array[i]= (rand()% (100-0 +1))+0;
}
for (int i = 0; i+2 < 100; i++){
result[i]= (array[i] + array[i+1] + array[i+2])/3;
total+= result[i];
}
total = total/98;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
