Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions Create a MIPS program that fulfills the following specifications: in the .data section: o 3 variables to hold input values: a, b, c o

image text in transcribedimage text in transcribed

Instructions Create a MIPS program that fulfills the following specifications: in the .data section: o 3 variables to hold input values: a, b, c o 3 variables to hold output values (name them whatever you like) o a variable to hold the user's name o 3 variables for messages: - - - A prompt for name A prompt for integers A message for results (similar to the sample run below) in the .text section write instructions to: o o prompt the user for their name and save it in memory 3 times: prompt user for an integer between 1-100 read and store the integers in a, b, and c - * o o o o o - no input checking required calculate ans1 2a -b+9 (use ata for 2a) and store the result calculate ans2 c-b+ (a - 5) and store the result calculate ans3 = (a-3) + (b + 4)-(c + 7)and store the result display the user name and message for results display the 3 results but print a space character in between for readability . at the bottom of your program, add comments with test values for a, b, c and the results you expect from the program for ans1, ans2, ans3 (see sample run below). Show at least 2 sample runs What to turn in: What is your name? Karen Please enter an integer between 1-100: 10 Please enter an integer between 1-100: 20 Please enter an integer between 1-100: 30 Karen your answers are: 915 -6 Note: Notice that printing the name string causes a newline, but don't worry about it Note also that you will need to print space' 'between numbers so that they don't run together If the user types anything other than an integer, you will get an exception. We haven't learned how to deal with that, so assume that your user can follow instructions

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

Students also viewed these Databases questions