mirror of
https://github.com/renbaoshuo/202401-programming-assignments.git
synced 2024-12-03 17:26:21 +00:00
16 lines
198 B
C
16 lines
198 B
C
|
#include <stdio.h>
|
||
|
|
||
|
int main() {
|
||
|
int x, ans = 0;
|
||
|
|
||
|
while (scanf("%d", &x), x > 0) {
|
||
|
if (x % 2 == 1) {
|
||
|
ans += x;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
printf("%d\n", ans);
|
||
|
|
||
|
return 0;
|
||
|
}
|