+ 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.

15th Jun 2024, 7:36 AM
𝗣𝗮𝘄𝗮𝗻 𝗞𝘂𝗺𝗮𝗿 🅟︎🅚︎
𝗣𝗮𝘄𝗮𝗻 𝗞𝘂𝗺𝗮𝗿 🅟︎🅚︎ - avatar
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
15th Jun 2024, 10:46 PM
X—X
X—X - avatar
+ 5
Try with a loop. A most easy solution is to repeat the print statement so many times and * as you need :)
15th Jun 2024, 8:03 AM
JaScript
JaScript - avatar
+ 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.
15th Jun 2024, 5:06 PM
Ausgrindtube
Ausgrindtube - avatar
+ 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.
15th Jun 2024, 10:29 AM
Ausgrindtube
Ausgrindtube - avatar
+ 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.
16th Jun 2024, 8:02 AM
Sushank Singh
+ 2
https://sololearn.com/compiler-playground/c6AwtXJIOIQ8/?ref=app
15th Jun 2024, 9:21 AM
Buterbrod:)
Buterbrod:) - avatar
+ 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.
15th Jun 2024, 12:47 PM
R🍁🇮🇳
R🍁🇮🇳 - avatar
+ 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
15th Jun 2024, 6:07 PM
Buterbrod:)
Buterbrod:) - avatar
+ 1
Is there a any easy or another solution I want 🙏
15th Jun 2024, 9:18 AM
𝗣𝗮𝘄𝗮𝗻 𝗞𝘂𝗺𝗮𝗿 🅟︎🅚︎
𝗣𝗮𝘄𝗮𝗻 𝗞𝘂𝗺𝗮𝗿 🅟︎🅚︎ - avatar
+ 1
Ausgrindtube Who knows, people are different
15th Jun 2024, 10:46 AM
Buterbrod:)
Buterbrod:) - avatar
+ 1
R💠🇮🇳 well then motivate
15th Jun 2024, 1:09 PM
Buterbrod:)
Buterbrod:) - avatar
+ 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 .
16th Jun 2024, 9:28 AM
𝗣𝗮𝘄𝗮𝗻 𝗞𝘂𝗺𝗮𝗿 🅟︎🅚︎
𝗣𝗮𝘄𝗮𝗻 𝗞𝘂𝗺𝗮𝗿 🅟︎🅚︎ - avatar
16th Jun 2024, 10:56 AM
𝗣𝗮𝘄𝗮𝗻 𝗞𝘂𝗺𝗮𝗿 🅟︎🅚︎
𝗣𝗮𝘄𝗮𝗻 𝗞𝘂𝗺𝗮𝗿 🅟︎🅚︎ - avatar
0
B
16th Jun 2024, 2:29 PM
Ratnesh Pandit
Ratnesh Pandit - avatar