title: Making an X picture in Java
body: <p>I'm trying to practice how to make simple shapes and am having trouble making this specific shape:</p>
  
  <pre><code>        X   X
           X X  
            X 
           X X
          X   X
  </code></pre>
  
  <p>I want to ask the user to enter a size and then, based on the size, it will make a shape in with those dimensions (the above shape is what would be printed if the user input 5). I was able to make a square using this code:</p>
  
  <pre><code>public static void main(String[] args) {
      Scanner scan = new Scanner(System.in);
      int size = 0;
      System.out.print("Enter the size of your shape: ");
      size = scan.nextInt();
  </code></pre>
  
  <p>That will get the size that the user wants. Then in order to draw the rectangle shape, I used this:</p>
  
  <pre><code>static void squareShape(int size){
      for(int i = 0;i &lt; size;i++){
          for(int j = 0;j &lt; size; j++){
              System.out.print("X");
          }
          System.out.println();
      }
  }
  </code></pre>
  
  <p>If anyone can help me with drawing the X it would be greatly appreciated :)</p>