write nested loops (while or for) to print a trun-
cated (missing a few lines at the top) triangular figure using
integers m and k. This figure is made up of stars and spaces. First
choose smaller of m and k, and call it top. Call the other number
height. For this truncated triangle, top tells you how many stars
(`*') are there on the top line. Height tells you, how many lines are
there. For the above example, m = 3 and k = 6 So top is 3 and height
is 6. Now print a truncated triangular figure of stars (*) as shown.
Here top line has 3 stars and truncated triangle has 6 lines.
m = 3, k = 6, top = 3, height = 6
***
*****
*******
*********
***********
*************
cated (missing a few lines at the top) triangular figure using
integers m and k. This figure is made up of stars and spaces. First
choose smaller of m and k, and call it top. Call the other number
height. For this truncated triangle, top tells you how many stars
(`*') are there on the top line. Height tells you, how many lines are
there. For the above example, m = 3 and k = 6 So top is 3 and height
is 6. Now print a truncated triangular figure of stars (*) as shown.
Here top line has 3 stars and truncated triangle has 6 lines.
m = 3, k = 6, top = 3, height = 6
***
*****
*******
*********
***********
*************
Comment