Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a C++ program that gets two inputs an integer and a character. Use repetit

ID: 3647111 • Letter: W

Question

Write a C++ program that gets two inputs an integer and a character. Use repetition control structures better known as "loops" to output a triangle shape composed of the character and the width specified by the integer. If the input is an even number, it should be increased to the next odd number. Use meaningful variable names, nested loop statements with proper indentation, appropriate comments, and good prompting messages.

For example, if the integer is 11 and the character is an asterisk (*), the triangle shape would look like this:

Sample screen output 1:


Enter a value to represent the base of a triangle shape (not to exceed 80): 11
Enter the character to be used to generate the triangle shape (for eg., #, * $): *

*
***
*****
*******
*********
***********

-------------------------------------------------------------------------------------------------------
Can you help me with this part,

This is PART 2:

Do you want to quit the program? (type n for no or q to quit): q


Expand on the program above to include a second algorithm (source code) to be used to generate a similar triangle shape except it will be facing the other direction. Provide the user with an option to choose between the two triangle shapes.

Sample screen output


Enter a value to represent the base of a triangle shape (not to exceed 50): 11
Enter the character to be used to generate the triangle shape (for eg., #, * $): #
Do you want to see the triangle shape facing up or down (type u or d or q to quit): d

###########
#########
#######
#####
###
#

Explanation / Answer

#include using namespace std; int main() { _____bool quit = false; _____char response = 0; _____int size; _____char ch; _____while (!quit) _____{ __________coutsize; __________coutch; __________for (int i = 1; i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote