subject

Your job is to write a program that prompts for a number of rows (r) from the user, then prints a parallelogram containing either r or rt1 rows. Your program may only print parallelograms of 3 to 23 rows, so you must force the value of r to be reasonable. After you get r, ifr is even, add one to get an odd number of rows. The upper part of the parallelogram must be right aligned with the point up. The lower part must abut the left margin. To draw the shape, you may only print single character spaces (' '), asterisks or stars (), and newline (\n'), flush or endl. You may not use any output manipulators, e. g., setw (), setfill(), in this program. Per the class design, you may use ONLY 3 LOOPS to print the shape itself, one to count rows, and one for the leading spaces and one for the stars on each row. Also, you MUST calculate the number of spaces and stars on a row from the row number and the total number of rows. You MAY NOT just initialize the values and adjust them up or down by one each row. For example (user entries in bold italic - and separate runs) 1 Enter number of rows: That is too few rows for me to make a parallelogram Enter number of rows: 30 That is too many rows for me to make a parallelogram Enter number of rows: 4 (notice this is changed to 5) Another run: Enter number of rows: 13 As usual, your prompts and error messages may contain any reasonable text. Don't skip a line after your prompt before drawing the parallelogram. Test with entries of too many rows, too few rows, a few even numbers of rows and a few odd numbers of rows. Include 3, 13 and 23 rows in your test set.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:30
Kyle, a receptionist for a building supply company, recently won an award for saving his company money on their phone system. after being presented with kyle's research, the company changed the way in which it made long-distance phone calls and cut their expenses in this area by 75 percent. the new system the kyle's company most likely adopted was wired communications switching stations voip hdtv
Answers: 3
question
Computers and Technology, 22.06.2019 23:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
Freya realizes she does not have enough in her bank account to use the debit card. she decides to use a credit card instead. which questions should freya answer before using a credit card? check all that apply. can i pay at least the minimum payment each month? can i make payments on time and avoid late fees? will i have to take out a loan? how much in finance charges can i afford to pay? should i talk to a consumer credit counseling service?
Answers: 1
question
Computers and Technology, 24.06.2019 07:00
Jean has kept the content of her website limited to what is important; she has also ensured that the text follows a particular style and color all throughout her website. which website features has jean kept in mind? jean has limited the content of her website to what is important; this ensures (clarity, simplicity, harmony and unity) of the content. she has also formatted the text in a particular style and color throughout her website, ensuring (balance, simplicity, consistency)
Answers: 2
You know the right answer?
Your job is to write a program that prompts for a number of rows (r) from the user, then prints a pa...
Questions