import java.util.InputMismatchException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int a = 0, b = 0, n = 0;
int k;
System.out.println("Enter n, a, b separated by a space: ");
try {
n = in.nextInt();
a = in.nextInt();
b = in.nextInt();
} catch (InputMismatchException e) {
System.out.println("Some from what you type - not a number ))) Restart the program");
return;
}
k = 2 * n;
for (int i = 0, j = 0; i < k; i+=2, j+=5) {
System.out.println(a+i);
System.out.println(b+j);
}
}
}
Comments
Leave a comment