• Post Reply Bookmark Topic Watch Topic
  • New Topic

Looping problem  RSS feed

 
Caleb Jhay
Greenhorn
Posts: 19
Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, Im kinda stock with this problem. I was trying to create this output using for loop




I was just wondering how to do it in java using loop any help?

Best regards
 
Riaan Nel
Ranch Hand
Posts: 160
IntelliJ IDE Ubuntu VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you tried? What happened? Please post your code.
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you written some code already; where exactly did you get stuck with this? Please post your code and explain in detail what it is you don't understand.

Do you know how to use loops? This part of Oracle's Java Tutorials explains while, do-while and for loops: Control Flow Statements
 
Caleb Jhay
Greenhorn
Posts: 19
Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually Im trying the whole alphabet. So far i got "D" and doing the rest so i still have no code with x and z thanks
Riaan Nel wrote:What have you tried? What happened? Please post your code.
 
Caleb Jhay
Greenhorn
Posts: 19
Firefox Browser
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
not yet thanks for the link
Jesper de Jong wrote:Have you written some code already; where exactly did you get stuck with this? Please post your code and explain in detail what it is you don't understand.

Do you know how to use loops? This part of Oracle's Java Tutorials explains while, do-while and for loops: Control Flow Statements
 
Campbell Ritchie
Marshal
Posts: 56541
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is awkward to write code to produce patterns for all letters. It is a lot easier to write this sort of pattern, because it has a definite repeating structure:

*
**
***
****
*****
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!