#include <stdio.h>
int main()
{
float heikin;
int ten[100];
int count, saikou, saitei, goukei;
int i, t;
for (count = 0; count < 100; count++) {
if (t == 999) break;
ten[count] = t;
}
if (count < 1) {
return 1;
}
saikou = saitei = goukei = ten[0];
for (i = 1; i < count; i++) {
if (saikou < ten[i]) saikou = ten[i];
if (ten[i] < saitei) saitei = ten[i];
goukei += ten[i];
}
heikin = (float)goukei / count;
for (i = 0; i < count; i++) {
printf("%3d %+f\n", ten
[i
], ten
[i
] - heikin
); }
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpCnsKCWZsb2F0CWhlaWtpbjsKCWludAl0ZW5bMTAwXTsKCWludAljb3VudCwgc2Fpa291LCBzYWl0ZWksIGdvdWtlaTsKCWludAlpLCB0OwoKCWZvciAoY291bnQgPSAwOyBjb3VudCA8IDEwMDsgY291bnQrKykgewoJCXNjYW5mKCIlZCIsICZ0KTsKCQlpZiAodCA9PSA5OTkpIGJyZWFrOwoJCXRlbltjb3VudF0gPSB0OwoJfQoJaWYgKGNvdW50IDwgMSkgewoJCXJldHVybiAxOwoJfQoKCXNhaWtvdSA9IHNhaXRlaSA9IGdvdWtlaSA9IHRlblswXTsKCWZvciAoaSA9IDE7IGkgPCBjb3VudDsgaSsrKSB7CgkJaWYgKHNhaWtvdSA8IHRlbltpXSkgc2Fpa291ID0gdGVuW2ldOwoJCWlmICh0ZW5baV0gPCBzYWl0ZWkpIHNhaXRlaSA9IHRlbltpXTsKCQlnb3VrZWkgKz0gdGVuW2ldOwoJfQoJaGVpa2luID0gKGZsb2F0KWdvdWtlaSAvIGNvdW50OwoJcHJpbnRmKCLmnIDpq5jngrk6JWRcbiIsIHNhaWtvdSk7CglwcmludGYoIuacgOS9jueCuTolZFxuIiwgc2FpdGVpKTsKCXByaW50Zigi5ZCI6KiI54K5OiVkXG4iLCBnb3VrZWkpOwoJcHJpbnRmKCLlubPlnYfngrk6JWZcbiIsIGhlaWtpbik7Cglmb3IgKGkgPSAwOyBpIDwgY291bnQ7IGkrKykgewoJCXByaW50ZigiJTNkICUrZlxuIiwgdGVuW2ldLCB0ZW5baV0gLSBoZWlraW4pOwoJfQoKCXJldHVybiAwOwp9Cg==