array
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | #include <stdio.h> int main(void) { int arrayNumber[15] = { 11, 22, 33, 44, 55, 66, 77, 88, 99, 110, 121, 132, 143, 154, 165 }; int sum = 0, loop = 0; for (loop = (sizeof (arrayNumber) / sizeof (int)) - 1; loop >= 0; loop--) { sum += arrayNumber[loop]; } printf("%d\n", sum); return 0; } | cs |
0 개의 댓글:
댓글 쓰기