Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help me to translate this c++ to MIPS assembly language!!! #include using namespace std; int main() { int n, i, k = 15, min, max,

Help me to translate this c++ to MIPS assembly language!!!

#include using namespace std;

int main() { int n, i, k = 15, min, max, temp; float num[16], sum=0.0, average;

cout << "PLease enter 15 numbers"<

for(i = 0; i < k; ++i) { cin >> num[i]; sum += num[i]; n = i; }

max = num[0]; for (i = 0; i < k; i++) { if (max < num[i]) max = num[i]; } min = num[0]; for (i = 0; i < k; i++) { if (min > num[i]) min = num[i]; } for(i=0;i<=n;i++) { for(int j=i+1;j<=n;j++) { if(num[i]>num[j]) { temp=num[i]; num[i]=num[j]; num[j]=temp; } } } average = sum / k; cout<<" Number in ascending order: "; for(int j=0;j

return 0; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions