Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main(string[] args)
- {
- int getal = int.Parse(Console.ReadLine());
- if (getal == 0)
- {
- Console.Write("0" + " " + "0");
- }
- else
- {
- int kleinste = 0;
- int grootste = 0;
- while (getal != 0)
- {
- getal = int.Parse(Console.ReadLine());
- if (getal > grootste)
- {
- grootste = getal;
- }
- else
- {
- if (getal < kleinste)
- {
- kleinste = getal;
- }
- }
- }
- Console.Write(kleinste + " " + grootste);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement