5.5.1. 숙제1 ¶
#include<stdio.h> void show(int *brr, int n){ int num=0; for (int i = 0; i < n; i++){ num += brr[i]; } printf("%d ", num); } int main(){ int a = 6; int arr[6] = { 1, 2, 3, 4, 5, 6 }; show(arr, 6); return 0; }
#include<stdio.h> void show(int *brr, int n){ int num=0; for (int i = 0; i < n; i++){ num += brr[i]; } printf("%d ", num); } int main(){ int a = 6; int arr[6] = { 1, 2, 3, 4, 5, 6 }; show(arr, 6); return 0; }