problem1

地址:https://projecteuler.net/problem=1。
问题:找到1000内3或5的倍数的和。
源码:git@code.aliyun.com:c-program/projecteuler.git。

#include <stdio.h>#define MAXNUM 1000int main(int argc, char **argv){    int iResult = 0;    int i;    for (i = 1; i < MAXNUM; i = i + 2){        if ((i % 3 == 0) || (i % 5 == 0)) iResult += i;    }        printf("Problem1 Answer: %d\n", iResult);    return 0;}