Question: Question: Write a C program that requires user to input a character and an integer value for size. Then according to the user's choice, your


Question: Write a C program that requires user to input a character and an integer value for size. Then according to the user's choice, your program should output either a square or "Bye". . Declare the variables for input number, character and shape choice. Declare a function named as squareChar() that takes two parameters, side (int type) and fillCharacter (char type), and it has no return value. Use loop to output your shape according to the rows and columns. . Retrieve input from the user and call the function in order to display the output as shown at the Sample Runs. In the main function. The user should input a character and an integer value for size. Then ask user to input either 1 or 2 as a choice value. . If the value of 1 is entered as a choice, then you should output the square by calling the function of squareCharo). If the value of 2 is entered as a choice, then you should output "Bye" as shown at the Sample Runs Please consider the 3 Sample Runs below. Sample Runt: Enter a character Enter size? Choose shapet for square for exit the program Enter the choice: 1 Sample Run 2: Enter a character Enter site: 9 Choose shape: 1 for square 2 for exit the program Enter the choice: 1 Sample Run 3: Enter a character: Enter size: 5 Choose shape: i for square 2 for exit the program Enter the choice: 2 Bye
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
