Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class letterCombination181216 {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- char fromSymbol = scan.nextLine().charAt(0);
- char toSymbol = scan.nextLine().charAt(0);
- char toIgnore = scan.nextLine().charAt(0);
- int counter = 0;
- for(char i=fromSymbol ; i<=toSymbol ; i++){
- for(char j=fromSymbol ; j<=toSymbol ; j++){
- for(char k=fromSymbol ; k<=toSymbol ; k++){
- if (i!=toIgnore && j!=toIgnore && k!=toIgnore){
- System.out.print("" + i + j + k + " ");
- counter++;
- }
- }
- }
- }
- System.out.println(counter);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement