Question: Q1: Write a complete C++ program that does the following 1. The program asks the user to enter a positive integer. 2. The program reads

 Q1: Write a complete C++ program that does the following 1.

Q1: Write a complete C++ program that does the following 1. The program asks the user to enter a positive integer. 2. The program reads a value n entered by the user. If the value is not legal, the program repeatedly makes the user type in another value until a legal value of n has been entered. 3. The program prints two adjacent triangular patterns with side n. Each triangle has horizontal side at the top and a vertical side at the right For example, if the user enters 4 for n the program should print the following picture. Q2: Write a complete C++ program that does the following. 1. It asks the user to enter an integer n that is between 1 and 15. 2. It repeatedly reads n from the user until the supplied value of n is legal. 3. It prints out a picture of an n n square formed of O characters except that a diagonal stripe, formed by the diagonal and any position immediately to its left, is left blank. Give me an integer between 1 and 15: 6 OOOOGO O000 O oo0 oo oO O00 O

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!