+ 1
How can I print this pattern in java
* ** *** **** ***** **** *** ** * How to print this pattern if am not understanding how can I solve it . I have check it out on YouTube but not find.
15 Respostas
+ 2
Here’s the answer to your problem using nested loops, in Java, and I added comments as well to help you understand why I did, what I did. Hopefully this helps and you are able to effectively learn from this. )))
https://sololearn.com/compiler-playground/c37SDomzeZEi
+ 5
Try with a loop.
A most easy solution is to repeat the print statement so many times and * as you need :)
+ 5
I believe that society knows Buterbrod:) , that's why there are things like projects and tests. If all we had to do was copy and paste previously completed answers... I'm sure you can figure out the rest.
And please be respectful of others, as you would expect others to be to you.
+ 3
Well done Buterbrod:) but please wait next time until you see the attempt from the poster. Providing a ready-made answer doesn't help so much.
+ 3
One of the easiest ways to understand patterns problem is to break the pattern into parts.
Think like this, it is a right angle triangle for 5 ⭐ , next it is an inverted right angle triangle of 4 ⭐.
Use 2 loops to solve it.
1st from 1 to n and 2nd from n-1 to 1.
+ 2
https://sololearn.com/compiler-playground/c6AwtXJIOIQ8/?ref=app
+ 2
Buterbrod:) Sololearn is self learning platform and community is to motivate user's to learn and try to create code after that if they issue any problem in code community will help.
+ 2
Ausgrindtube
I don't agree with you, but I also don't want to argue with you, so let's leave it at that
+ 1
Is there a any easy or another solution I want 🙏
+ 1
Ausgrindtube
Who knows, people are different
+ 1
R💠🇮🇳
well then motivate
+ 1
Buterbrod:) It's a really a great solution which I ever seen yet. The great part of this of is ("*".repeat ) this is really great method to solve patterns in few code I have try this .
0
B