#include <stdio.h>
int main(void) {
int maximum, count, sum;
count = 0;
sum = 0;
printf("Enter maximum number:");
while(count < maximum) {
if (count % 3 == 0) {
sum = sum + count;
}
count = count + 1;
}
printf("The sum of all multiples of three is %d.", sum
); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbih2b2lkKSB7CglpbnQgbWF4aW11bSwgY291bnQsIHN1bTsKY291bnQgPSAwOwpzdW0gPSAwOwoKcHJpbnRmKCJFbnRlciBtYXhpbXVtIG51bWJlcjoiKTsKc2NhbmYoIiVkIiwgJm1heGltdW0pOwoKd2hpbGUoY291bnQgPCBtYXhpbXVtKSB7CglpZiAoY291bnQgJSAzID09IDApIHsKCQlzdW0gPSBzdW0gKyBjb3VudDsKCX0KCWNvdW50ID0gY291bnQgKyAxOwoKfQoKcHJpbnRmKCJUaGUgc3VtIG9mIGFsbCBtdWx0aXBsZXMgb2YgdGhyZWUgaXMgJWQuIiwgc3VtKTsKCXJldHVybiAwOwp9Cg==