Neowise

SortApp

Nov 10th, 2020 (edited)
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.65 KB | None | 0 0
  1. using System;
  2.  
  3.  
  4. namespace Program
  5. {
  6.     class SortApp
  7.     {
  8.         static void Main(string[] args)
  9.         {
  10.             int x = 76, y = 777, z = 76;
  11.            
  12.             if(x < y) {
  13.                 int tmp = x;
  14.                 x = y;
  15.                 y = tmp;
  16.             }
  17.                        
  18.             if(x < z) {
  19.                 int tmp = x;
  20.                 x = z;
  21.                 z = tmp;
  22.             }
  23.            
  24.             if(y < z) {
  25.                 int tmp = y;
  26.                 y = z;
  27.                 z = tmp;
  28.             }
  29.            
  30.             Console.WriteLine(x + " " + y + " " + z);
  31.         }
  32.     }
  33. }
  34.  
Add Comment
Please, Sign In to add comment