Can anyone tell me how to sketch shapes like square with empty space in a middle, diamond with empty space and without empty space, too, an arrow, separately, pointing all directions, an oval shape empty space and without empty, and all other by using nested for loop? Kindly guide me with its coding.
cout<<"Enter the number of lines : ";
if(j==1 || j==n || i==1 || i==n)
i controls the line .for each line we have some characters that is controlled by j. the condition for square is
1) in first and last line print the character in all places.
for this i specify the condition if(i==1 || i==n)
2) in all other lines we have to put the character in first and last place only
for this i specify the condition if(j==1 || j==n)
3) for all lines between first and last we have to put space in the placed left by second condition.
for this i specify the condition else cout<<' ';