Pattern 18 - Java program to print K Shape Alphabetic Pattern || Java Pattern Programs

preview_player
Показать описание
- Whenever you design logic for a pattern program, first draw that pattern in the blocks, as we have shown in the following image. The figure presents a clear look of the pattern.

- Each pattern program has two or more than two loops.

- The number of the loop depends on the complexity of pattern or logic.

- The first for loop works for the row and the second loop works for the column. In the pattern programs, Java for loop is widely used.

A B C D
A B C
A B
A
A
A B
A B C
A B C D
- In the above pattern, the row is denoted by i and the column is denoted by j.

- We see that the first row prints only a one character. The second-row prints two characters, and so on. The blank blocks print the spaces.

- In this pattern, there are two patterns combined.

Patterns :



#LearningandTeachingCoding #JavaPatternPrograms
Рекомендации по теме
Комментарии
Автор

Mam can we write
System.out.print ( (char) (64+c));

lakshyaplays
join shbcf.ru