title: Java Program printing numbers in sequence
body: <p>I'm writing this program with numbers, but I am stuck and need some help.</p>
  
  <p>Code so far:</p>
  
  <pre><code>public static void main(String[] args) {
      Scanner in = new Scanner(System.in);
      System.out.print("Oppgi øvre grense: ");
      int Number = in.nextInt(); 
      int tall = 1;
      for(int t = 0; tall &lt;=45; tall++){
              System.out.println(" " + tall);
      }   
  }
  </code></pre>
  
  <p>The objective: to get the first line to contain one number, the second to contain two numbers, third line contain three numbers, etc.
  The output should look like a pyramid, with different spacing between the numbers on each line.</p>
  
  <p>If anybody can help me with the solution code. Thank you.</p>
  
  <p>Oppgi øvre grense: 45 
   1 
   2 3 
   4 5 6 
   7 8 9 10 
   11 12 13 14 15 
   16 17 18 19 20 21 
   22 23 24 25 26 27 28 
   29 30 31 32 33 34 35 36 
   37 38 39 40 41 42 43 44 45 </p>