콤마로 구분된 숫자들의 합을 구하기
프로그래밍/C,C++·2021. 12. 4.
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 #include #include #include int main(void) { char arr[100] = ""; int sum = 0; int x = 0 ,y = 0; int tmp = 0; printf("문자열을 입력하세요 : "); scanf("%s",arr); for (int i = 0; i