Number Pattern in java - using for as well as while loop

preview_player
Показать описание
We'll make a program using nested for loop as well as nested while loop to print the following pattern according to the value of 'n' entered by user:

*
* 1 *
* 1 2 1 *
* 1 2 3 2 1 *
* 1 2 1 *
* 1 *
*

We'll learn how to take input from the user using the scanner class present in util package of java.
We get this resultant output when user enters the value of n=3.

The link to my previous video in which I discussed the number pattern logic without stars:

Feel free to post your queries and doubts in the comment section below...Just hope you are able to understand the logic and concept, please give some suggestions for improvement...Thankyou everyone ♡♥♡...!!!
Рекомендации по теме
Комментарии
Автор

Thanks! I'll practice this today.

majone