Assignment 81
Code
/// Gian Adoremos
/// Period: 7
/// Program Name: EightyFirst Program
/// File Name: CountingMachineR.java
/// Date Finished: 1/14/2016
import java.util.Scanner;
public class CountingMachineR
{
public static void main( String[] args )
{
int f,t,b;
Scanner key = new Scanner(System.in);
System.out.println("count from: ");
f = key.nextInt();
System.out.println("count to: ");
t = key.nextInt();
System.out.println("count by: ");
b = key.nextInt();
for ( int n = f ; n <= t ; n = n+b )
{
System.out.println( "Mr. Davis is cool" );
}
}
}
Picture of the output