Assignemnt #83

Code

/// Name: Connor Siri
/// Period: 7
/// Program Name: Count2
/// File Name: Count2.java
/// Date Finished: 12/2/2015

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

Assignment4.html