Question: Exercise 3: Function Write a function named triangle that accepts an integer parameter representing a size in characters, and prints to the console a right-aligned
Exercise 3:
Function Write a function named triangle that accepts an integer parameter representing a size in characters, and prints to the console a right-aligned right triangle figure whose non-hypotenuse sides are that length. For example, the call of triangle(5); should print the following output:
* ** *** **** *****
You may assume that the value passed for the size is at least 1. in PHP
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
