Floyd’s Triangle and ICSE as pattern – Computer Sir Ki Class

Login


Lost your password?

Don't have an account ?
Register (It's FREE) ×
  

Login
[lwa]



Exam Questions-ICSE2016-05A #JAVA#7319    siteicon   siteicon  

Problem Statement - Floyd’s Triangle and ICSE as pattern

Using the switch statement, write a menu driven program for the following:
(i) To print the Floyd’s triangle
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
(ii) To display the following pattern
I
I C
I C S
I C S E
For an incorrect option, an appropriate error message should be displayed.

Solution

TC++ #7319

Run Output

1. Floyd's triangle
2. ICSE Pattern
Enter your choice: 1
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15

-- OR --

1. Floyd's triangle
2. ICSE Pattern
Enter your choice: 2
I
I C
I C S
I C S E


Share

CSKC| Created: 16-Apr-2019 | Updated: 22-Feb-2020|ICSE2016









Back