How to make a MIPS program that get average of ten studentss

How to make a MIPS program that get average of ten students\'s math, science, and english score. Each students\'s average should printed on promt.

Solution

#include<stdio.h>
    #include<stdlib.h>
    int main()
    {
        int s1,s2,s3,sum,i;
        float avg;
   
         printf(\"enter marks of ith student \");
         scanf(\"%d\",&i);
         for( i=0;i<=10;i++){
        printf(\"\ maths Marks : \");
        scanf(\"%d\",&s1);
        printf(\"\ Science Marks : \");
        scanf(\"%d\",&s2);
        printf(\"\ English Marks : \");
        scanf(\"%d\",&s3);
        sum = s1+s2+s3;
        printf(\"\ \ THE SUMATION IS %d \",sum);
        avg = sum/3;
        printf(\"\ \ THE AVERAGE IS %.2f\",avg);
        return avg;
}
    }

The MIPS code for ocresponding C code is :

How to make a MIPS program that get average of ten students\'s math, science, and english score. Each students\'s average should printed on promt.Solution#inclu

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site