• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Looping problem

 
Greenhorn
Posts: 19
Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 160
IntelliJ IDE VI Editor Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What have you tried? What happened? Please post your code.
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:

*
**
***
****
*****
 
You will always be treated with dignity. Now, strip naked, get on the probulator and hold this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic