1 2 3 4 5 6 7 8 9 10 11 12 | #include <stdio.h> int main(void) { int n, sum=0; for (n = 1; n <= 100; n++) { if (n % 3 == 0 && n % 5 == 0) sum += n; } printf("1ºÎÅÍ 100±îÁö 3°ú 5ÀÇ °ø¹è¼öÀÇ ÇÕÀº %d ÀÔ´Ï´Ù.", sum); } | cs |