aboutsummaryrefslogtreecommitdiff
path: root/semestr-3/pf/lista2/test.cpp
blob: 59d0a45a10d2b92d4c67a2fd6013b046617c9701 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <iostream>

using namespace std;
int tab[100];
int main()
{
    int x,n,j;
    for(int i=0;i<=1000;i++)
    {
     cin>>x;
     if(x==-1)
     {
         break;
     }
     tab[x]++;
    }
    for(int i=0;i<=100;i++)
  {
   j=0;
   while(j<tab[i]){
    cout<<i<<" ";
    j++;
   }

  }
    return 0;
}