SHARE
TWEET

Untitled

a guest May 19th, 2017 37 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /* William Silva
  2.    3/17/10
  3.    This program creates a times table for a user-inputed number. */
  4. import TerminalIO.KeyboardReader;
  5.  
  6. public class TimestableForLoop  {
  7.      public static void main(String [] args) {
  8.          KeyboardReader reader = new KeyboardReader();
  9.          double input;
  10.          double number;
  11.          int i;
  12.          System.out.print("Enter number for times table and press enter: ");
  13.          input = reader.readDouble();
  14.  
  15.          for (i = 1; i <= 10; i++){
  16.             number = input * i;
  17.             System.out.print(input); System.out.print(" times ");System.out.print(i); System.out.print(" = ");
  18.             Syst
  19.             em.out.print(number); System.out.println();
  20.         }
  21.      }
  22. }
RAW Paste Data
Challenge yourself this year...
Learn something new in 2017
Top