Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace SortThreeNumbers
- {
- class SortThreeNumbers
- {
- static void Main()
- {
- Random rnd = new Random();
- int a = rnd.Next(-1000, 1000);
- int b = rnd.Next(-1000, 1000);
- int c = rnd.Next(-1000, 1000);
- for (int i = 1; i <= 1; i++)
- {
- if ((a >= b && a > c) || (a > b && a >= c))
- {
- Console.WriteLine(a);
- }
- else if ((b >= a && b > c) || (b > a && b >= c))
- {
- Console.WriteLine(b);
- }
- else if ((c >= a && c > b) || (c > a && c >= b))
- {
- Console.WriteLine(c);
- }
- else if (a==b && a==c)
- {
- Console.WriteLine(a);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement