2050번 알파벳을 숫자로 변환
2023. 3. 20. 17:27ㆍSWEA
Problem Solving - Level 1 - 알파벳을 숫자로 변환
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
string str;
cin>>str;
for(int i=0;i<str.size();i++)
{
int N=str[i]-64;
cout<<N<<" ";
}
}
'SWEA' 카테고리의 다른 글
2058번 자릿수 더하기 (0) | 2023.03.20 |
---|---|
2056번 연월일 달력 (0) | 2023.03.20 |
2047번 신문 헤드라인 (0) | 2023.03.20 |
2046번 스탬프 찍기 (0) | 2023.03.17 |
2043번 서랍의 비밀번호 (0) | 2023.03.17 |