PROGRAMMING AND CODE


Assignemnt #110

Code

/// Name: Justin Li
/// Period: 7
/// Program Name: Displaying Some Multiples
/// File Name: DisplayingSomeMultiples.java
/// Date Finished: 5/5/2016

import java.util.Scanner;

public class DisplayingSomeMultiples
{
    public static void main( String[] args )
    {
        Scanner keyboard = new Scanner(System.in);
        int number, product;
        
        System.out.print( "Choose a number: " );
        number = keyboard.nextInt();
        for ( int x = 1; x <=12; x++ )
        {
            product = number*x;
            System.out.println( number + "x" + x + " = " + product );
        }
    }
}
   
    

Picture of the output

Assignment 1