Advertisement
GertMoey

Untitled

Oct 23rd, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.71 KB | None | 0 0
  1. using System;
  2. class Program
  3. {
  4.     static void Main(string[] args)
  5.     {
  6.         int[] tabel = new int[100];
  7.         int getal = int.Parse(Console.ReadLine());
  8.         int teller = 0;
  9.         int laagstegetal = getal;
  10.         while(0 <= getal && getal <100)
  11.         {
  12.             if( getal < laagstegetal)
  13.             {
  14.                 laagstegetal = getal;
  15.             }
  16.             tabel[getal] = tabel[getal]+1;
  17.             getal = int.Parse(Console.ReadLine());
  18.         }
  19.         if(0 <= laagstegetal && laagstegetal < 100)
  20.         {
  21.             Console.Write(laagstegetal);
  22.             teller = laagstegetal;
  23.         }
  24.         while(teller < 99)
  25.         {
  26.             teller++;
  27.             if(0 < tabel[teller])
  28.             {
  29.                 Console.Write(" " + teller);
  30.             }
  31.         }
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement