115 pisi
QUESTION #3:
Using loops, write a Ct+ program, that prompts the user to enter from the keyboard the number of rows (size must be >4 ) in a triangle and displays a triangle as shown below. Numbers in the trlangle ar separated by one space. If the user enters incorrect slze value, your program should print a proper. Sample Ry message and quit the program. Your program must produce the output as shown below.
Please enter the triangle size: 3
Invalid size of triangle, byel
Enter the triangle size: 6
The triangle of 6 rows is:
able[[1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,],[1,2,3,,],[1,2,,,]]
#include
|15nts
QUESTION#3:
Please enter the triangle size: 3 Invalid size of triangie, bye! the triangle size: 6 Enter The triangle of 6 rows is: 3 4 5 6 1 2 2 3 4 5 1 1 2 3 4 1 2 3 1 2 1
#include <iostream> using namespace std; int main()