SarthakKeshari / Java-Questions-and-Solutions

This repository aims to solve and create new problems from different spheres of coding. A path to help students to get access to solutions and discuss their doubts.
MIT License
46 stars 95 forks source link

Java pattern #419

Closed Prithijit07 closed 2 years ago

Prithijit07 commented 2 years ago

Issue Id you have worked upon -

387

Briefly explain your program logic -

The program stated to print a pattern using Java code. I used nested for loops and if-else conditions to print the given pattern. In the nested for loops I first printed the required spaces in the inner loop followed by printing the correct value in the outer loop and thereafter increasing/decreasing the space count as when it's required to do so.

Screenshots(Attach 2 screenshots of your own input and output) -

image


Checklist:

Eg - If your code follow the below guidelines. Kindly change [] to [x]

All the conditions should be fulfilled for considering your code for merging -

Prithijit07 commented 2 years ago

Added comments and the question @SarthakKeshari