Created
June 1, 2017 00:47
-
-
Save nattybear/1104c381bdc34c1978ebedd12a6809c8 to your computer and use it in GitHub Desktop.
C언어에서 실수형 자료형의 표현
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| int main() { | |
| float a = 5.789F; | |
| printf("%d\n", a); | |
| return 0; | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
float.c코드를 컴파일 시도하면 아래와 같은 에러가 나네format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘double’%d서식문자는 인자로 실수형만 받을 수 있나보다