입력

알파벳 소문자, 대문자, 숫자 0-9 

 

출력

주어진 글자의 아스키 코드 값

 

코드

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>
using namespace std;
int main() {
 
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
 
    char x;
    cin >> x;
    int a = x;
    cout << a;
 
    return 0;
}
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5; text-decoration:none">Colored by Color Scripter

 

문제 출처

https://www.acmicpc.net/problem/11654

 

11654번: 아스키 코드

알파벳 소문자, 대문자, 숫자 0-9중 하나가 주어졌을 때, 주어진 글자의 아스키 코드값을 출력하는 프로그램을 작성하시오.

www.acmicpc.net

 

+ Recent posts