Question: Program Description Write a program in Assembly to print a limited Pascal's Triangle. First, the user is instructed to enter the number of rows to
Program Description
Write a program in Assembly to print a limited Pascal's Triangle. First, the user is instructed to enter the number of rows to be displayed, and is prompted to enter an integer in the range The user enters a number, x and the program verifies that leq x leq If x is out of range, the user is reprompted until they enter a value in the specified range. The program then calculates and displays the first boldsymbolx rows of Pascal's Triangle.
Program Requirements
The programmer's name and program title must appear in the output.
The procedure must consist of only procedure calls with any necessary framing It should be a readable "list" of what the program will do
Each procedure will implement a section of the program logic, ie each procedure will specify how the logic of its section is implemented. The program must be modularized into at least the following procedures and subprocedures:
Introduce Program and Programmer
Prompt for and receive userinput number of triangle lines to print. Validate user input is in specified bounds and reprompts as necessary.
printPascalTriangle Receives number of rows of Pascal's Triangle to print. Prints this number of rows of Pascal's Triangle. Uses printPascalRow to print each line.
Receives two values, n and k Outputs the result of n Choose k computation. See Binomial Coefficient Wikipedia Article for more details.
Receives index of row to be printed. Prints all elements of Pascal's Triangle for this row. Uses nchoosek procedure to obtain each element to be printed.
Thanks user for using the program.
The upper and lower bounds of user input must be defined as constants.
The directive is not allowed on this project.
If the user enters a number outside the range an error message must be displayed and the user must be prompted to reenter the number of lines of the Triangle to be shown.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
