Assignment #81 and Counting Machine Revisited

Code

                        /// Name: Graham Pollock
                        /// Period: 5
                        /// Program Name: Counting Machine Revisitied
                        /// File Name: CMachineR.java
                        /// Date Finished: 02/9/2016/
                        
    import java.util.Scanner;
        
        public class CMachineR
        {
            public static void main(String[] args)
            {
                Scanner keyboard = new Scanner(System.in);
                
                System.out.print("Count from: ");
                int f = keyboard.nextInt();
                System.out.print("Count to: ");
                int t = keyboard.nextInt();
                System.out.print("Count by: ");
                int b = keyboard.nextInt();
                
                for (int n = f; n <= t; n = n + b)
                {
                    System.out.print(n + " ");
                }
                System.out.println("");
            }
        }
    

Picture of the output

Assignment