parent
67a5af11f9
commit
822ae9e849
@ -0,0 +1,28 @@ |
|||||||
|
{ |
||||||
|
"tasks": [ |
||||||
|
{ |
||||||
|
"type": "cppbuild", |
||||||
|
"label": "C/C++: gcc.exe 활성 파일 빌드", |
||||||
|
"command": "C:/mingw64/bin/gcc.exe", |
||||||
|
"args": [ |
||||||
|
"-fdiagnostics-color=always", |
||||||
|
"-g", |
||||||
|
"${file}", |
||||||
|
"-o", |
||||||
|
"${fileDirname}\\${fileBasenameNoExtension}.exe" |
||||||
|
], |
||||||
|
"options": { |
||||||
|
"cwd": "C:/mingw64/bin" |
||||||
|
}, |
||||||
|
"problemMatcher": [ |
||||||
|
"$gcc" |
||||||
|
], |
||||||
|
"group": { |
||||||
|
"kind": "build", |
||||||
|
"isDefault": true |
||||||
|
}, |
||||||
|
"detail": "디버거에서 생성된 작업입니다." |
||||||
|
} |
||||||
|
], |
||||||
|
"version": "2.0.0" |
||||||
|
} |
@ -0,0 +1,19 @@ |
|||||||
|
#include <stdio.h> |
||||||
|
|
||||||
|
int main() |
||||||
|
{ |
||||||
|
int year = 2025; |
||||||
|
float price = 9.99; |
||||||
|
char grade = 'A'; |
||||||
|
char message[] = "Hello, World!"; |
||||||
|
unsigned int hexNum = 255; |
||||||
|
|
||||||
|
printf("Year: %d\n", year); // d: 정수
|
||||||
|
printf("Price: %f\n", year); // f: 실수 (소수점 아래 6자리)
|
||||||
|
printf("Price2: %.2f\n", year); // .2f: 소수점 아래 두 자리 실수
|
||||||
|
printf("Grade: %c\n", grade); // c: 문자
|
||||||
|
printf("Message: %s\n", message); // x: 16진수
|
||||||
|
printf("255 to Hex: %x\n", hexNum); // x: 16진수
|
||||||
|
|
||||||
|
return 0; |
||||||
|
} |
Binary file not shown.
Loading…
Reference in new issue