title: JAVA: Use While Loop to print out character as many times as the number read in
body: <p>Hello I'm having issues on my intro to Computer Science Lab Work:</p>
  
  <p>CharacterLine.java: Write a program that prints a line of characters. Prompt the user to enter a character and then ask for a number. If the number is lies than 1 or greater than 80, tell the user then to exit the program. Use a while Loop to print out the character as many times as the number read in. 
  Example:
  Please enter a character: &amp;
  Please enter a number: 15
  Your line: &amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import java.util.Scanner;
  
  public class CharacterLine
  
  {
      public static void main(String[] args)
      {
  
          Scanner kb = new Scanner (System.in);
          int number;
          System.out.print("Please enter a character: ");
          String character = kb.next();
          int charact = character.length();
  
          System.out.print("Please enter a number: ");
          number = kb.nextInt();
  
          while ( number &lt;= 80 &amp;&amp; number &gt;= 1 ){
  
              if ( number &lt;= 80 &amp;&amp; number &gt;= 1 ) {
                  int bills = (charact * number);
                  System.out.println("Your line: " + charact++);
              }
              else {
                  System.out.println("error.");
              }
              System.out.println();
              System.out.print("Please enter a number: ");
              number = kb.nextInt();
          }
          if ( number &gt; 80 ){
              System.out.println("That number is too large");
          }
          else if ( number &lt; 1 ){
              System.out.println("That number is too small");
          }
          else{
              System.out.println("error");
          }
      }
  }
  </code></pre>
  
  <p>I am having issues in knowing how I can multiply the number that the user inputted and make the output the number times the one letter that the user inputted.</p>
  
  <p>Thanks,
  William</p>