SHARE
TWEET

Untitled

a guest Oct 23rd, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.    int arr[25];
  8.    for (int t=0; t<25; t++) {
  9.        arr[t]=50-t;
  10.    }
  11.    int h_arr[51];
  12.    for (int i=0; i<51; i++) h_arr[i]=0;
  13.    for (int i=0; i<25; i++) h_arr[arr[i]]++;
  14.    for (int i=0; i<51; i++){
  15.    for (int j=0; j<h_arr[i]; j++){
  16.        cout << i << endl;
  17.    }
  18.  
  19.    }
  20.    return 0;
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top