"SWEA 2047 신문 헤드라인"의 두 판 사이의 차이

 
(사용자 3명의 중간 판 9개는 보이지 않습니다)
1번째 줄: 1번째 줄:
==개요==
==개요==
;SWEA 2047 신문 헤드라인
{{SWEA|난이도=1}}
* https://www.swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5QKsLaAy0DFAUq
* 문자열 전체 또는 문자 하나하나를 대문자로 변환하여 출력한다.
 
{{SWEA 헤더}}
{{SWEA 난이도 1-1}}
|}


==C++==
==C++==
<source lang='cpp'>
<syntaxhighlight lang='cpp'>
</source>
#include <iostream>
using namespace std;
int main() {
    string s;
    cin >> s;
    for(int i=0; i<s.length(); i++) putchar(toupper(s.at(i)));
}
</syntaxhighlight>


==Java==
==Java==
<source lang='java'>
<syntaxhighlight lang='java'>
import java.util.Scanner;
import java.util.Scanner;
class Solution {
class Solution {
21번째 줄: 24번째 줄:
     }
     }
}
}
</source>
</syntaxhighlight>
 
==Python==
<syntaxhighlight lang='python'>
#kcy
k = input()
print(k.upper())
</syntaxhighlight>
<syntaxhighlight lang='python'>
print( input().upper() )
</syntaxhighlight>

2023년 8월 25일 (금) 01:41 기준 최신판

1 개요[ | ]

SWEA 2047 신문 헤드라인

2 C++[ | ]

#include <iostream>
using namespace std;
int main() {
    string s;
    cin >> s;
    for(int i=0; i<s.length(); i++) putchar(toupper(s.at(i)));
}

3 Java[ | ]

import java.util.Scanner;
class Solution {
    public static void main(String args[]) {
        Scanner sc = new Scanner(System.in);
        String s = sc.next();
        System.out.println(s.toUpperCase());
    }
}

4 Python[ | ]

#kcy
k = input()
print(k.upper())
print( input().upper() )
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}