1
0
mirror of https://github.com/renbaoshuo/202401-programming-assignments.git synced 2024-12-16 15:44:39 +00:00

23 lines
302 B
C
Raw Normal View History

2024-11-27 10:25:12 +08:00
// int max=0,min=9999999,total=0;
int fun() {
int x;
static int cnt = 0;
while (scanf("%d", &x) != EOF && x != -1) {
total += x;
if (x > max) {
max = x;
}
if (x < min) {
min = x;
}
cnt++;
}
return cnt;
}