Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write this in MIPS Write a program that will print a triangle to the console. .Write a procedure called printTriangle. This will take the

Please write this in MIPS

image text in transcribed

Write a program that will print a triangle to the console. .Write a procedure called printTriangle. This will take the edge length of the base of the right triangle as argument Sa0. It will then print the triangle with stars. For instance, if five is given by the user as an input, the program will print stars starting with one star up to five stars to form Your mainline program will ask the user the edge length of the base of right triangle. If user enter 0 or a negative number, the program exits. Otherwise, the program will pass the edge length value in $a0 to the printTriangle procedure, which will print the triangle as described. The mainline code will then loop back to ask the user for a new edge length. The example execution and the shape of the triangle is given below. Note: You need to submit your source code on blackboard. Your source needs to have comments that explain your implementation. You need to include the following set of #Your Name and ld #Assignment # (Example: Homework #7) Example Execution and the Output: Please enter the edge length of the base of right triangle: 5 Please enter the edge length of the base of right triangle:8 Please enter the edge length of the base of right triangle:0 Exiting the program

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

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions