Write a program that asks the user for a start, stop and skip value and prints the integers from the start to the stop, skipping by the skip value. You may assume the skip value is positive and that start ≤ high. Please place a comma between each number, but no comma after the last value.
import java.util.Scanner;
class Count{
public static void main(String[] args) {
int start,
stop,
skip;
int i;
Scanner myScanner = new Scanner(System.in);
System.out.print("Enter the start value => ");
start = myScanner.nextInt();
System.out.println();
System.out.print("Enter the stop value => ");
stop = myScanner.nextInt();
System.out.println();
System.out.print("Enter the skip value => ");
skip = myScanner.nextInt();
System.out.println();
i = start;
System.out.print(i);
i = i + skip;
while (i <= stop) {
System.out.printf(", %d", i);
i += skip;
}
System.out.println();
}
}