반응형
문제 이해
아이디어
코드
import java.util.Scanner;
import java.io.FileInputStream;
class Solution
{
public static void main(String args[]) throws Exception
{
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();
sc.close();
char tmp ;
String output="";
for(int i=0;i<str.length();i++)
{
tmp = str.charAt(i);
if(97<= tmp && tmp <= 127) // 소문자라면
output += str.valueOf(tmp).toUpperCase();
else
output += tmp;
}
System.out.println(output);
}
}
집사는개발자가되고파
choppadontbiteme.tistory.com
반응형
'Algorithm > SWEA' 카테고리의 다른 글
[SWEA] 2058. 자릿수 더하기 D1 JAVA (0) | 2021.03.16 |
---|---|
[SWEA] 2050. 알파벳을 숫자로 변환 D1 JAVA (0) | 2021.03.16 |
[SWEA] 2046. 스탬프 찍기 D1 JAVA (0) | 2021.03.16 |
[SWEA] 2043. 서랍의 비밀번호 D1 JAVA (0) | 2021.03.16 |
[SWEA] 2029. 몫과 나머지 출력하기 D1 JAVA (0) | 2021.03.16 |