Write a menu driven program to accept a number(as number of line)then print the Triangle
Pattern or Print inverted triangle pattern according to the number of line.
If user choice=1(means Print triangle)
and input number of line=4
Then output will be display like this:
1
4 4
9 9 9
16 16 16 16
If user choice=2(means Print Inverted triangle)
and input number of line=5
Then output will be display like this:
5 5 5 5 5
4 4 4 4
3 3 3
2 2
1
If user choice=3 then print invalid choice
Answers
Answered by
0
Answer:
simple solutions bro 1,44,9999
Similar questions
English,
5 months ago
Social Sciences,
10 months ago
Environmental Sciences,
10 months ago
Science,
1 year ago
Science,
1 year ago
Science,
1 year ago