tags:

views:

127

answers:

0

I'm writing a MiPS program that will examine a list of 15 test scores. And it is going to input from the terminal. The passing criterion is the score of 50. The outputs to the terminal will include the scores in each category and the number of students passing and failing. I should use input prompts and output statement. Below is C program for it, but i dont know how to translate it to MIPS program. please can someone help translate it to MIPs.

include

include

int main()

{

int pass,fail,grade,studentcounter;

pass=0;

fail=0;

grade=0;

studentcounter=0;

while (studentcounter < 15)

{

printf("enter the next grade:\n");

scanf("%d",&grade);

if (grade >= 50)

{

pass++;

}

else

{

fail++;

}

studentcounter++;

}

printf("the number of fail is: %d \n",fail);

printf("the number of pass is: %d \n",pass);

return 0;

}