This is a medium level star pattern created using for loops
Question
Write down a programme segment to print the following pattern to the screen using ‘for’ loops and appropriate conditional statements if the number of lines, which is an odd number between 3 and 11, inclusive, is provided. The sample output for three instances are given below,
for 3 lines,
for lines=5,
*
for lines = 7,
-
*
-
-
*