aboutsummaryrefslogtreecommitdiff
path: root/semestr-3/pf/lista2/test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'semestr-3/pf/lista2/test.cpp')
-rw-r--r--semestr-3/pf/lista2/test.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/semestr-3/pf/lista2/test.cpp b/semestr-3/pf/lista2/test.cpp
new file mode 100644
index 0000000..59d0a45
--- /dev/null
+++ b/semestr-3/pf/lista2/test.cpp
@@ -0,0 +1,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;
+} \ No newline at end of file