fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a=0,b=0;
  5.  
  6. while(a<=100)
  7. {
  8. if((a%3!=0)&&(a%5!=0))
  9.  
  10. b=a+b;
  11. a=a+1;
  12.  
  13. }
  14. printf("和は%dです。",b);
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
和は2632です。