O V10 1- Β
97:dl³΅³ρ / :
96
ΌYνσ]
#include <stdio.h
#include <stdlib.h
#define MAX_INPUT 10
static int intcmp(const void *lhs, const void *rhs) {
____return *(int *)lhs - *(int *)rhs;
}
int main()
{
____char buf[256];
____int n[MAX_INPUT];
____int count = 0;
____int i;
____
____while (fgets(buf, sizeof(buf), stdin)) {
________if (sscanf(buf, "%d", &i) != 1) {
____________break;
________}
________n[count++] = i;
________if (count = MAX_INPUT) {
____________break;
________}
____}
____qsort(n, count, sizeof(int), intcmp);
____for (i = 0; i < count; i++) {
________printf("%d\n", n[i]);
____}
____return 0;
}
O
ir ver 1.0 beta2.2 (03/10/22)