Assignemnt #81 and Counting Machine Revisited
Code
///name: nick cerdan
///period: 6
///program name: Counting Machine revisted
///file name: CMachineR.java
///date finished: 10/29/15
import java.util.Scanner;
public class CMachineR
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
System.out.print("Count from: ");
int f = keyboard.nextInt();
System.out.print("Count to: ");
int t = keyboard.nextInt();
System.out.print("Count by: ");
int b = keyboard.nextInt();
for (int n = f; n <= t; n = n + b)
{
System.out.print(n + " ");
}
System.out.println("");
}
}