Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Demo2 {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- char first = scanner.nextLine().charAt(0);
- char second = scanner.nextLine().charAt(0);
- char third = scanner.nextLine().charAt(0);
- for (int i = first; i <= second; i++) {
- for (int j = first; j <= second; j++) {
- for (int k = first; k <= second; k++) {
- if (i == third || j == third || k == third) {
- continue;
- } else {
- System.out.printf("%c%c%c ", i, j, k);
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement