Difference between revisions of "CSC231 Homework 5 2017"
(Created page with "--~~~~ ---- __TOC__ <br /> <bluebox> This homework is due on 4/3/17, at 11:55 p.m. </bluebox> <br /> =Problem #1= <br /> Write an assembly language program that prompts the us...") |
(→Problem #1) |
||
Line 17: | Line 17: | ||
Note that the output corresponds to 3 geometric patters: a triangle of 5 lines, a square of 5 lines, and another triangle of 5 lines. The width of the square and triangles is 5 star (max length of a line). | Note that the output corresponds to 3 geometric patters: a triangle of 5 lines, a square of 5 lines, and another triangle of 5 lines. The width of the square and triangles is 5 star (max length of a line). | ||
<br /> | <br /> | ||
− | [[Image:hw5_1top.png| | + | [[Image:hw5_1top.png|230px]] |
− | [[Image:hw5_1middle.png| | + | [[Image:hw5_1middle.png|230px]] |
− | [[Image:hw5_1bot.png| | + | [[Image:hw5_1bot.png|230px]] |
<br /> | <br /> |
Revision as of 07:13, 25 March 2017
--D. Thiebaut (talk) 08:12, 25 March 2017 (EDT)
Contents
This homework is due on 4/3/17, at 11:55 p.m.
Problem #1
Write an assembly language program that prompts the user for an integer, and prints out a pattern of stars representing a triangle, a square, and another triangle.
Here is an example where the user enters 5 when prompted by the program:
Note that the output corresponds to 3 geometric patters: a triangle of 5 lines, a square of 5 lines, and another triangle of 5 lines. The width of the square and triangles is 5 star (max length of a line).