How to draw letters into shapes without knowing cycles?

  • 0
    Reading Yakov Fine's book - Programming in java for children of grandparents' parents, I got a little bewildered.
    In the book, the author gives the task on page 39 to draw HELLO with asterisks.



    At the same time, there were no cycles in the book yet. Completed only types. If it is possible to draw this creation without loops, give a hint how to do it? Really like sout? I will be glad to any hints.
    Java August Alvarado, May 16, 2020

  • 3 Answers
  • 0
    Very simple. You need to connect abstract thinking, figure out the spaces between the asterisks and display 5 lines. If I were a child learning Java, I would take a notebook in a box and figure out which lines to print in it.
    Anonymous

  • 0
    Modify the HelloWorld class to print the word Hello, as shown below.


    The HelloWorld class probably has a command like

    System.out.println ("Hello world!");

    You need to write instead:

    System.out.println("*    * ***** *     *      ****");
    System.out.println("* * * * * * *");
    System.out.println("****** ***** * * * *");
    System.out.println("* * * * * * *");
    System.out.println("* * ***** ***** ***** ****");
    Anonymous

  • 0
    And what prevents you from typing it in a notepad and displaying it in the console?
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!