본문 바로가기

Programming/Algorithm (C++)

[백준 1550번] c언어 :: 16진수

 

 

#include <stdio.h> 

int main() {

	int A;
	scanf("%x", &A); 

	printf("%d\n", A);
	return 0;
}

%d: 10진수(정수형)

%f: 실수형

%e: 지수형

%o: 8진수

%x: 16진수

%u: 부호없는 10진수

%g: 실수형 자동출력

%p: 포인터의 주소

%c: 하나의 문자로 출력

%s: 문자열