Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting And Auditing Research And Databases Practitioner's Desk Reference

Authors: Thomas R. Weirich, Natalie Tatiana Churyk, Thomas C. Pearson

1st Edition

1118334426, 978-1118334423

More Books

Students also viewed these Databases questions