We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
int n = Integer.parseInt(bufferedReader.readLine().trim());
if (n < 2 || n > 20) {
System.out.println("The value of n should be between 2 and 20.");
} else {
for (int i = 1; i <= 10; i++) {
System.out.printf("%d x %d = %d%n", n, i, n * i);
}
}
bufferedReader.close();
}
}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 5: Loops
You are viewing a single comment's thread. Return to all comments →
JAVA
}