Assignemnt #81

Code

/// Name: Ryan Volko
/// Period: 7
/// Program Name: Count2
/// File Name: Count2.java
/// Date Finished: 3/1/2016

import java.util.Scanner;

public class Count2
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
System.out.print("Count from: ");
int x = keyboard.nextInt();

System.out.print("Count to: ");
int y = keyboard.nextInt();

System.out.print("Count by: ");
int z = keyboard.nextInt();

for ( int n = x ; n <= y; n = n+z)
{
System.out.print( n + " " );
}
    System.out.println("");
}
}
    

Picture of the output

Assignment 81