Assignemnt #81 and anotherCount.java

Code

    /// Name: Boris Kazantsev
    /// Period: 6
    /// Program Name: anotherCount
    /// File Name: anotherCount.java
    /// Date Finished: 2/22/2016
    
    import java.util.Scanner;

    public class anotherCount{
        public static void main(String[] args){
            
            Scanner keyboard = new Scanner(System.in);
            
            System.out.print("Count from: ");
            int from = keyboard.nextInt();
            System.out.print("Count to: ");
            int to = keyboard.nextInt();
            System.out.print("Count by: ");
            int by = keyboard.nextInt();
            
            for ( int n = from; n <= to/by - from/by; n++){
                
                System.out.print(((from + by*n) < 10?" ":"") + (from + by*n) + "  ");
                
    			if(n % 10 == 0 && n != 0){
                    System.out.print("\n");
                }
                    
            }
            System.out.println();
        }
    }


   
    

Picture of the output

Assignment 81