Assignment #81

Code

    /// Name: Ian Stanko
    /// Period: 5
    /// Program Name: countingmachine2
    /// File Name: countingmachine2.java
    /// Date Finished: 1/31/2016
    
    import java.util.Scanner;

    public class countingmachine2
    {
        public static void main( String[] args )
        {
            Scanner keyboard = new Scanner(System.in);
            
            int to, from, by; 
            
            System.out.print( "Count from: ");
            from = keyboard.nextInt();
            System.out.print( "Count to: " );
            to = keyboard.nextInt();
            System.out.print( "Count by: " );
            by = keyboard.nextInt();
    
            for ( int n = from; n <= to; n = n + by )
            {
                System.out.println( n + " " );
            }
            System.out.println( " " );
    
        }
    }      


    

Picture of the output HOME

Assignment 81