vendredi 25 juin 2021

Write a java program to find the pattern: [closed]

Write a program to print the following pattern up to given no. of rows (R) given by user.

if R=5, output will be

1 2 3 4 5 * 5 4 3 2 1
1 2 3 4 # # # 4 3 2 1
1 2 3 * * * * * 3 2 1
1 2 # # # # # # # 2 1
1 * * * * * * * * * 1   

Aucun commentaire:

Enregistrer un commentaire