#include <bits/stdc++.h> #include "hxy.h" using namespace std; int main() { fx h; h.set(); h.get(); return 0; } #include <bits/stdc++.h> using namespace std; class fx{ private: int Cnt=10; int list[100]={0}; int value; public: void set() { for(int i=0;i<Cnt;i++) { cin>>value; list[value]++; } } void get() { for(int i = 0 ; i < 100 ; i++ ) { if(list[i]){ for(int j = 0 ; j < list[i] ; j++) cout<<i<<" "; } } } };
标签:set,int,list,value,++,include,CLASS From: https://www.cnblogs.com/hanxuyao/p/17992625