Assignment #81 Counting Machine re;
Code
/// Name: DeeJay Cerezo
/// Period: 7
/// Program Name: ForMachi
/// File Name: ForMachi.java
/// Date Finished: 2/24/2016
import java.util.Scanner;
public class ForMachi
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
System.out.println( "Type in 3 numbers" );
System.out.print( "Count From: " );
int numberone = keyboard.nextInt();
System.out.print( "Count to: " );
int numbertwo = keyboard.nextInt();
System.out.print( "Count by: " );
int numberthree = keyboard.nextInt();
for ( int n = numberone ; n <= numbertwo ; n = n+ numberthree )
{
System.out.print( n + " " );
}
}
}
Picture of the output