/*
#include <stdio.h>
int main()
{
printf("123456789");
return 0;
}
컴파일 : F9
명령의 끝에는 ;(세미콜론)을 붙인다
*/
/*
#include<stdio.h>
int main()
{
printf("Hello");
return 0;
}
*/
/*
#include<stdio.h>
int main()
{
printf("Hello World");
return 0;
}
/
\
*/
/*
#include<stdio.h>
int main()
{
printf("Hello\nWorld");
return 0;
}
*/
/*
#include<stdio.h>
int main()
{
printf("\'Hello\'");
return 0;
}
*/
/*
포함하다
std standard
io input output
.h header
기본입출력에 대한 내용이 들어있는 사전 파일
#include<stdio.h>
int main()
{
printf("\"Hello World\"");
return 0;
}
%d %f %c %%
\ \\
*/
/*
#include<stdio.h>
int main()
{
printf("\"!@#$%%^&*()\"");
return 0;
}
\""C:\\Download\\hello.cpp"\"
*/
/*#include<stdio.h>
int main()
{
printf("\"C:\\Download\\hello.cpp\"");
return 0;
}
자료형 data type
정수 소수점아래 없는 숫자 -1 0 50
실수 소수점 아래 있는 숫자 3.14
문자 키보드 한 알 'a' 'b'
정수 integer -> int
실수 부동소수점 floating point -> float
문자 character -> char(캐릭터)
****자료형************
선언 입출력
정수 int %d
실수 float %f
문자 char %c
*********************
1. 명령의 끝에는 ; 붙이기
2. scanf쓸때는 변수 앞에 &주소연산자 적어주기
#include <stdio.h>
int main()
{
int a; //정수 담는 박스 a 만들기
scanf("%d",&a); //정수 하나를 a에 담기
printf("%d",a); //정수 하나를 출력하기
return 0;
}
*/
/*#include <stdio.h>
int main()
{
int g;
scanf("%d", &g);
printf("%d", g);
return 0;
}
*/
/*#include <stdio.h>
int main()
{
char j;
scanf("%c", &j);
printf("%c", j);
}
*/
#include <stdio.h>
int main()
{
float j;
scanf("%f", &j);
printf("%f", j);
}