fork download
  1. #include <stdio.h>
  2.  
  3. int main(){
  4. int n,m;
  5. n=1;
  6. m=0;
  7.  
  8. while(n<101){
  9. if(
  10. n%3!=0
  11. &&n%5!=0
  12. &&n%10>=6
  13. ){
  14. m=m+n;
  15. } else{
  16.  
  17. }
  18. n=n+1;
  19. }
  20.  
  21. printf("求める和は%d",m);
  22.  
  23. return 0;
  24. }
Success #stdin #stdout 0s 5256KB
stdin
Standard input is empty
stdout
求める和は1365