fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int a=1,sum=0;
  6. while(1<=a&&100>=a)
  7. {
  8. if(a%3!=0&&a%5!=0&&a%10>=6)
  9. {
  10. sum=sum+a;
  11. }
  12. a=a+1;
  13. }
  14. printf("合計:%d",sum);
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0.01s 5304KB
stdin
Standard input is empty
stdout
合計:1365