Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main() {
- //char age -> 세미콜론 미작성
- char age;
- //scanf("&c", age); -> &c가 아닌 %c, scanf를 해줄때는 변수 앞에 &를 붙여주어야 하기에 age가 아닌 &age
- scanf("%c", &age);
- //printf("&d", age); -> &d가 아닌 %d
- printf("%d", age);
- /*
- 서식문자에 대한 공부 필요성이 느껴짐
- 문자를 입력 받고 숫자를 출력하려고 노력한 점은 좋았음
- */
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement