이것저것
코드 깔끔하게 업로드 (Color Scripter)
나무뒤에티모
2019. 2. 20. 00:17
반응형
< 코드 깔끔하게 업로드 (Color Scripter) >
그냥 올려도 되는데 깔끔하게 코드 업로드 하면 좋잖아요~
Color Scripter !
사용법도 쉽고 그냥 원래 개발하던 환경마냥 나오니깐 보기도 편하다~
내 코드 다른사람이 이용할때 긁어서 복사해도 문제없구
사용하면
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | package test; import java.util.Scanner; class alpha { public static void main(String[] args) { int cnt[] = new int[26]; Scanner sc = new Scanner(System.in); System.out.print("Please enter a string: "); String str = sc.nextLine(); for (int i = 0; i < str.length(); i++) { char ch = str.toUpperCase().charAt(i); if(Character.isLetter(ch)) cnt[ch - 'A']++; } System.out.println("=== 각 문자의 수 ==="); for (int i = 0; i < 26; i++) { System.out.println((char) (65 + i) + " : " + cnt[i]); } } } |
이런식으로 이쁘게 나온답니당 색갈도 구분되고~
티스토리에서 코드 올리기~!
반응형