Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class TriplesOfLatinLetters {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int n = Integer.parseInt(scanner.nextLine());
- for (int firstSymbol = 'a'; firstSymbol < 'a' + n; firstSymbol++) {
- for (int secondSymbol = 'a'; secondSymbol < 'a' + n; secondSymbol++) {
- for (int thirdSymbol = 'a'; thirdSymbol < 'a' + n; thirdSymbol++) {
- System.out.printf("%c%c%c%n", firstSymbol, secondSymbol, thirdSymbol);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment