Assignment #81 Counting Machine Revisited
Code
///Name: Ian Grant
///Period:5
///Project Name: Counting Machine Revisited
///File Name:CountingMachineRev.java
///12/11/15
import java.util.Scanner;
public class CountingMachineRev
{
public static void main(String[] args)
{
Scanner stuff=new Scanner(System.in);
System.out.print("Count From: ");
int s = stuff.nextInt();
System.out.print("Count to: ");
int num = stuff.nextInt();
System.out.print("Count by: ");
int by = stuff.nextInt();
for (int forloopsareweird; s<=num; s=s+by)
{
System.out.print(" "+s);
}
}
}
Output