Computer Science, asked by biggyboo175, 10 months ago

Write a menu-driven program for the following patterns for n lines as long as user wishes:
If n is 3 then
13 3 3
2 12 2
3 2 11
If n is 4 then
14 4 4 4
2 13 3 3
3 2 12 2
4 3 2 11

Answers

Answered by Anonymous
2

.

.

int n;

cin>>n;

switch(n)

{

case 3:

cout<<"13 3 3"<<endl<<"2 12 2"<<endl<<"3 2 11";

break;

case 4;

cout<<"14 4 4 4"<<endl<<"2 13 3 3"<<endl<<"3 2 12 2"<<endl<<"4 3 2 11";

break;

}

.

.

Similar questions