Commit d11243fa23c9e44443aa45da5d083c98be0e8edf
1 parent
5b79f6b69a
Exists in
master
pending p2
Showing 1 changed file with 5 additions and 0 deletions Side-by-side Diff
HW3/multiples.c
View file @
d11243f
... | ... | @@ -19,6 +19,11 @@ |
19 | 19 | d7++; |
20 | 20 | } |
21 | 21 | } |
22 | + /* | |
23 | + d3 = 6-(i[0]%3+i[1]%3+i[2]%3+i[3]%3+i[4]%3+i[5]%3); | |
24 | + d7 = 6-(i[0]%7+i[1]%7+i[2]%7+i[3]%7+i[4]%7+i[5]%7); | |
25 | + d21 = 6-(i[0]%21+i[1]%21+i[2]%21+i[3]%21+i[4]%21+i[5]%21); | |
26 | + */ | |
22 | 27 | printf("%d divisible by 3,\n%d divisible by 7,\n%d divisible by both.\n", d3, d7, d21); |
23 | 28 | return 0; |
24 | 29 | } |