#include <stdio.h> int main() { int sum=0,i; for(i=3;i<=100;i++){ if(i%3==0&&i%5!=0){ sum+=i; } } printf("%d\n",sum); return 0; }
应该是结尾多了大括号,或者少了大括号