|Write a program to print a pyramid pattern of star...|General Coding Problems

fn print_pyramid(n: u32)

Easy

Write a program to print a pyramid pattern of stars with n rows.

fn print_pyramid(n: u32)

Asked in

infosyswipro

Examples

Example 1:
Input: 3
Output: * *** *****
Example 2:
Input: 1
Output: *
Submit Result

Click Run to test sample cases, or Submit to evaluate all cases