입력 예시
f

 

출력 예시
a b c d e f

 

import java.io.IOException;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws IOException {
       Scanner scan = new Scanner(System.in);

       char a = scan.nextLine().charAt(0);
       int b = (int) a;

       for(int i=97; i<=b; i++){
           System.out.print( (char)i+" ");
       }
    }
}

복사했습니다!