1 //综合 2 #include <iostream> 3 #include "liu.h" 4 using namespace std; 5 class liu{ 6 private: 7 int m=10; 8 int value; 9 int maxx=10000; 10 int list[10000]={0}; 11 public: 12 set(){ 13 for(int i=0;i<m;i++){ 14 cin>>value; 15 list[value]++; 16 } 17 } 18 get(){ 19 for(int i=0;i<maxx;i++){ 20 if(list[i]!=0){ 21 for(int j=0;j<list[i];j++){ 22 cout<<i<<" "; 23 } 24 } 25 } 26 } 27 }; 28 29 int main(){ 30 liu l; 31 l.set(); 32 l.get(); 33 return 0; 34 }
标签:10,include,10000,函数,自创,int,value,liu,排序 From: https://www.cnblogs.com/liujiaxing-/p/17992630