Question: Need help, write in c program use if only for loops and nested for loops. Thank you For this lab you will write a small
For this lab you will write a small program that prints a few "shapes" using asterisks. Your program will prompt the user to select a shape by entering a number (square or triangle for B grade, add the zig zag for the A grade). It will then prompt for the size, and then if a square or triangle is selected it will prompt for "not filled" or "filled", and if a zig-zag is selected it will prompt for the number of repetitions. (See back for an example run). After printing a shape, your program will loop back and prompt again for another. One of the "shape selections" will cause the program to exit. Notes: For pre-lab, draw a flowchart of your code and make a serious attempt at writing it. Bring this to lab. It will be checked at the beginning of lab and will be a part of your total lab grade Have your code behave exactly (and format exactly) as shown below for the sample rurn. Suggestion: work on how to draw a square first. Use "nested for loops" for this (one inside the other) For the unfilled square, substitute spaces for the asterisks on the "inside" (how do you know if a given location is "inside" the square?). The triangle code can be similar, but with a few small changes (mine had only two small changes)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
