mirror of
https://github.com/renbaoshuo/202401-programming-assignments.git
synced 2024-11-27 08:26:20 +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;
|
||
|
}
|