fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int sum = 0, n = 1;
  6. while(n <= 100){
  7. if ((n % 3 != 0) && ((n % 10) >= 6)){
  8. sum += n;
  9. printf("%d\n", n);}
  10. n += 1;
  11. }
  12. printf("%d", sum);
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
7
8
16
17
19
26
28
29
37
38
46
47
49
56
58
59
67
68
76
77
79
86
88
89
97
98
1365