Question: In this MIPS assignment we will be working with both text strings and a user input integer array from the data segment. The goal of
In this MIPS assignment we will be working with both text strings and a user input integer array from the data segment. The goal of the assignment is to have the user choose the number of items that they want to have in an array (we will keep it a small number for now, 1-10) and then enter that many values which we will store into our array. We then want to allow them to search for a specific item in the list of numbers that they just entered and report if the number was found or not.
Requirements:
You must make use of the data segment in order to both have strings to prompt the user and to have a location to store the values the user inputs.
String prompts and information about the program must be given to the user in a well formatted and logical fashion so that someone using the program with no knowledge about it would understand what is happening.
The user must be allowed to choose the number of items they are going to input, though we will limit it to a smaller number (1-10).
The user can then enter their integers, which must be stored in the array defined in the data segment.
You will then prompt the user for an integer to search for and then search through the input array to see if it is present.
If it is, report success. If it is not found, report failure.
This program will take in a number of integer values between 1 and 10 and then take in a value to search the list for. The program will then report if the value was found in the list or not. How many items will the list contain? Enter a number between 1 and 10: 5 Enter the first value:
1 Enter the next value:
2 Enter the next value:
3 Enter the next value:
4 Enter the next value:
5 Enter the value we are searching the list for:
3 Found the value in the list.
-- program is finished running --
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
