title: Writing a word in a rhombus/diamond shape in Java
body: <p>I have to write a program that asks a word and then prints it in a rhombus/diamond shape, like this:</p>
  <pre><code>Word: Hello
  H
  He
  Hel
  Hell
  Hello
   ello
    llo
     lo
      o
  </code></pre>
  <p>I tried something but I really could use some help if someone could, I tried something like this:</p>
  <pre><code>import java.util.Scanner;
  
  public class Rhombus {
      public static void main(String[] args) {
          Scanner sc = new Scanner(System.in);
  
          System.out.print(&quot;Word: &quot;);
          String word = sc.nextLine();
          int wordLength = word.length();
  
          for (int i = 0; i &lt; wordLength; i++) {
              System.out.println(word.substring(0, i));
  
          }
      }
  }
  </code></pre>