标签:stdio.h char span for getch return color turn printf
1 #include <stdio.h> 2 3 int main(void){ 4 int book[1001], i, j, t,n; 5 for (i = 0; i <= 1000; i++) 6 book[i] = 0; 7 scanf("%d", &n); 8 for (i = 0; i < n; i++){ 9 scanf("%d", &t); 10 book[t]++; 11 } 12 for (i = 1000; i >= 0; i--) 13 for (j = 1; j <= book[i]; j++){ 14 printf("%d ", i); 15 } 16 getchar(); 17 return 0; 18 19 }
标签:stdio.h char span for getch return color turn printf
原文地址:http://www.cnblogs.com/zhangshuwen/p/7309534.html