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