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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!