일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
- 두 수 크기 비교 함수
- 2차원 배열
- Unity
- Logic Gates
- Axes
- 문자 분류
- 개인 정리
- 전처리기 정의
- C언어
- 논리 게이트
- 극장 예약 프로그램
- round()함수
- scanf 오류
- 기호 상수
- 소스코드 하이라이팅
- C 언어
- 두 값 교체하기
- 유니티허브
- UnityHub
- 미리 컴파일된 헤더 사용안함
- 키입력값 받기
- 난수 값 맞추기 게임
- time.h
- GetAxis()메서드
- 유니티
- 배열 사용X
- AWS Discovery Book
- ASCII CODE TABLE
- 반사 벡터
- 프로젝트 목록 제거
- Today
- Total
목록C (26)
flrto
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 #include int main(void) { char ch; printf("문자를 입력하시오: "); scanf("%c", &ch); if (ch >= 'A' && ch = 'a' && ch = '0', ch
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 #include #include #include int main() { int x = 0; int com = 0; srand(time(NULL)); printf("1 가위 2 바위 3 보\n\n"); scanf("%d", &x); com = (rand() % 3) + 1; if (x == 1) { printf("나 가위 "); } else if (x == 2) { printf("나 바위 "); } else i..
#define my_num = 1; const int my_num = 1; 왠만하면 const를 이용한 기호 상수를 이용하는 것이 좋다.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 #include #include #include int main(void) { int i; srand(time(NULL)); printf("0 ~ 9 사이의 뽑기 \n"); printf("%d", rand() % 10); printf("\n"); return 0; }
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 #include #include int main(void) { //short 형 short s_money = SHRT_MAX; unsigned short u_money = USHRT_MAX; s_money = s_money + 1; printf("s_money = %d\n", s_money); u_money = u_money + 1; printf("u_money = %d\n", u_money); //int 형 int i_money = INT_MAX; unsigned int u_i_money = UINT_MAX; i_money..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 #include int main() { int a = 0; int b = 0; int temp = 0; printf("a값을 입력하시오 : \n"); scanf("%d", &a); printf("b값을 입력하시오 : \n"); scanf("%d", &b); printf("교체 전 a값 : %d, b값 : %d\n", a, b); temp = a; a = b; b = temp; printf("교체 후 a값 : %d, b값 : %d\n", a, b); return 0; }

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 #include int main() { int sum = 0; int x = 0; int y = 0; printf("첫번째 수를 입력하시오 : \n"); scanf("%d", &x); printf("두번째 수를 입력하시오 : \n"); scanf("%d", &y); sum = x + y; printf("두 수의 합은 : %d", sum); return 0; } 다음과 같은 예제에서 scanf를 사용하여 수를 입력받고 그 결과를 출력하는 소스에서 컴파일이 안되는 오류가 발생 한다. 밑에 오류 이유를 보면 This function or variable may be unsafe. Consider using scan..