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