Given a positive integer n print a triangle of stars as in the example below
Example:
Input: n = 5 Output: * ** *** **** ***** Explanation: Print 5 lines, on ith line print i stars.
Walkthroughs of the solution. Try the steps first, then watch to compare approaches.
Free plan: 30 tutor messages. Premium is unlimited.
Saved
Ctrl + Enter to check