쉽게 풀어쓴 C언어 익스프레스 프로그래밍 10장 3번
#include #define SIZE 10 int array_equal(int a[], int b[],int size); int main(void) { int result = 0; int a[SIZE] = { 0,1,2,4,5,6,7,8,9 }; int b[SIZE] = { 0,1,2,3,4,5,6,7,8 }; result = array_equal(a,b,SIZE); if (array_equal(a,b,SIZE) == SIZE) printf("두 배열이 같습니다.\n"); else printf("두 배열이 다릅니다.\n"); return 0; } int array_equal(int a[], int b[],int size) { int result = 0; for (int i = 0; i
2019. 11. 14.
쉽게 풀어쓴 C언어 익스프레스 프로그래밍10장 1번
#include int main(void) { int days[] = { 31,29,31,30,31,30,31,31,30,31,30,31 }; int i = 0; printf("월을 입력: "); scanf_s("%d", &i); for (int a = 0; a
2019. 11. 14.