fork download
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5. int i =1;
  6. int sum =0;
  7. while(i<=100)
  8. {
  9. if(i%3!=0&&i%5!=0)
  10. {
  11. sum+=i;
  12. }
  13. i++;
  14. }
  15. printf("合計は%dです\n",sum);
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
合計は2632です