일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 개인프로젝트
- 이웃한 칸
- 프로그래머스
- 프로그램
- Python
- 프로그래밍
- java정리
- java
- 백준
- 자바정리
- SNS
- 코테
- 코딩테스트
- C++
- 자바독학
- 코스닥
- Reflex
- 자바
- 사물인터넷
- frontend
- Project
- 주가예측
- 모의 주식
- backend
- 코딩독학
- 코딩
- 빅데이터
- 풀스택프레임워크
- 개발자
- 개발
- Today
- Total
목록C Programming (104)
Creative Code
※main.c파일 #include #include "board.h" int main(void) { int frameScores[11] = {0,}; int scores[11][3] = {0,}; printBoard(); for (int i = 1; i=2 && scores[i-1][1] != 10 && scores[i-1][1] + scores[i-1][2] == 10) { int bonus = scores[i][1]; frameScores[i-1] = frameScores[i-2] +10 +bonus; //printf("%d frameScore :%d\n", i-1, frameScores[i-1]); setFrameScore(i-1,frameScores[i-1]); } else if (i>=3 && s..
#include void printStringArray(char (*pArr)[20], int size) { for (int i = 0; i
#include int main(void) { char *str = "hello, world"; printf("%s\n",str); return 0; }
#include #include #include int my_atoi(char *str) { int num = 0; int len = strlen(str); for (int i = len-1; i>=0; i--){ num += (str[len-1-i] - '0')*(pow(10,i)); } return num; } int main(void){ int i = my_atoi("100"); printf("i : %d\n",i); return 0; }
※main.c파일 #include #include "string.h" int main(void) { char title1[] = "wonderful tonight"; int len = my_strlen(title1); // 문자열의 길이 printf("len : %d\n", len); //메모리에 할당된 공간은 18바이트지만 문자열의 길이는 17바이트로 출력 char title2[my_strlen(title1)+1]; my_strcpy(title2,title1); //문자열 복사 if (my_strcmp(title1,title2) == 0 ) { // 문자열 비교 결과가 0이면 같음 printf("title1 and title2 are equal\n"); } else { printf("title1 and..
#include typedef struct student { char name[21]; int kor; int eng; int mat; int total; double average; int rank; }Student; int main(void) { FILE *fin, *fout; fin = fopen("score.dat","r"); // 읽기용 fout = fopen("score.out","w"); //쓰기용 Student students[10]; int board[10]; for (int i = 0; iaverage,table[i]->rank); } fclose(fin); fclose(fout); return 0; }