Write and test a MIPS assembly language program that determines if three positive integers entered by a user form a triangle. The three integers from a triangle if the sum of any two of the integers is greater than the third integer. The program begins by prompting the user to enter three positive integers. Next, it performs the calculations and comparisons necessary to determine if the integers form a triangle. The program then displays an appropriate message (see sample runs), based on the results of the tests. Finally, it asks the user if s/he wants to test more integers. If the user types 1, the program loops again. If the user types 0, it ends. Be sure to include error-checking code to deal with the possible entry of integers that are negative or 0 (zero), in the event of which an appropriate error message should be displayed and the user prompted to enter another integer. Your program output should resemble the sample runs at the end of this document. Notes: ? The program must loop. ? The use of procedures is optional. ? Please document all sources (Web, in particular) used to complete this project.
Sample run #1 (User enters integers that do/do not form a triangle, as well as some invalid values.): Please enter 3 positive integers by pressing after each: 3 4 5 The integers DO form a triangle *********************************************************************** Do you want to test more integers? (Type 0 to quit, 1 to run again.): 1 *********************************************************************** Please enter 3 positive integers by pressing after each: 0 Invalid entry! Please enter 3 positive integers by pressing after each: 1 -1 Invalid entry! Please enter 3 positive integers by pressing after each: 1 1 0 Invalid entry! Please enter 3 positive integers by pressing after each: 2 2 2 The integers DO form a triangle *********************************************************************** Do you want to test more integers? (Type 0 to quit, 1 to run again.): 1 *********************************************************************** Please enter 3 positive integers by pressing after each: 1 2 3 The integers do NOT form a triangle *********************************************************************** Do you want to test more integers? (Type 0 to quit, 1 to run again.): 1 *********************************************************************** Please enter 3 positive integers by pressing after each: 4 4 8 The integers do NOT form a triangle *********************************************************************** Do you want to test more integers? (Type 0 to quit, 1 to run again.): 1 *********************************************************************** Please enter 3 positive integers by pressing after each: 7 5 6 The integers DO form a triangle *********************************************************************** Do you want to test more integers? (Type 0 to quit, 1 to run again.): 0 *********************************************************************** -- program is finished running -- 4 Sample run #2 (User enters three integers to test and quits.): Please enter 3 positive integers by pressing after each: 12 5 13 The integers DO form a triangle *********************************************************************** Do you want to test more integers? (Type 0 to quit, 1 to run again.): 0 ***********************************************************************
Instructions: Please create a MIPS assembly language program to solve the following problem. Submit electronic (Canvas Dropbox) copies of your program source code and two or more sample runs to me by the deadline. Submit printouts of your source code and runs to me by the same deadline. Please note that printouts are required if you want your submission to be considered for a grade. Documentation requirements follow the problem specification. 1. Write and test a MIPS assembly language program that determines if three positive integers ent a triangle. The three integers form a triangle if the sum of any two of the integers is greater than the third integer. The program begins by prompting the user to enter three positive integers. Next, it performs the calculations and comparisons necessary to determine if the integer then displays an appropriate message (see sample runs), based on the results of the tests. Finally, it asks the user if s/he wants to test more integers. If the user types "I," the program loops again If the user types "O," displayed and the user prompted to enter another integer. Your program output should resemble the sample runs at the end of this document. Notes it ends. Be sure to include error-checking code to deal with the possible entry of t are negative or 0 (zero), in the event of which an appropriate error message should be The program must loop. .The use of procedures is optional .Please document all sources (Web, in particular) used to complete this project. (Note: I strongly commend reviewing the Academic Integrity Policy on the CMPSC 312 syllabus.) dditional Note You may work on this programming project with one of your classmates. If you decide to do so please submit one electronic copy and one paper copy containing both of your names References MIPS resources posted on Canvas (electronic books, lecture slides, demo programs)