Assignment #81 Counting Machine Revisisted
Code
///Name: Morgan Kaplan
///Period: 5
///Project Name: Counting Machine Revisited
///File Name: CMR.java
import java.util.Scanner;
public class CMR
{
public static void main( String[] args )
{
Scanner momo = new Scanner(System.in);
System.out.print( "Count from: " );
int a = momo.nextInt();
System.out.print( "Count to: " );
int b = momo.nextInt();
System.out.print( "Count by: " );
int c = momo.nextInt();
for ( int n = a ; n <= b ; n = n+c )
{
System.out.println("" + n + "");
}
}
}
Picture of Output