package algorithmsample9;
import java.util.Scanner;
/**
*
* @author Nurhak
*/
public class AlgorithmSample9 {
public static void main(String[] args) {
int number = 0;
String data = "";
try {
Scanner scan = new Scanner(System.in);
System.out.println("Please enter an integer value!");
data = scan.nextLine();
number = Integer.parseInt(data);
for (int i = 1; i <= number * 2; i++) {
System.out.println(i + " --> " + number);
}
} catch (Exception e) {
System.err.println("An error occured! Please enter an integer value!");
}
}
}
Comments
Post a Comment