Advertisement
myloyo

9.2.15

Nov 2nd, 2023 (edited)
972
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 KB | None | 0 0
  1. using System;
  2. using System.IO;
  3. using System.Collections.Generic;
  4. using System.Collections.Specialized;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. using System.Globalization;
  9.  
  10. namespace myloyorrr
  11. {
  12.     class Program
  13.     {
  14.         static void Main()
  15.         {
  16.             using (StreamReader sr = new StreamReader("C:/Настя/in.txt"))
  17.             {
  18.                 using (StreamWriter sw = new StreamWriter("C:/Настя/out.txt"))
  19.                 {
  20.                     int x, y;
  21.                     string s;
  22.                     while ((s = sr.ReadLine()) != null)
  23.                     {
  24.                         string[] a = s.Split(' ');
  25.                         x = int.Parse(a[0]);
  26.                         y = int.Parse(a[1]);
  27.                         sw.WriteLine(Math.Min(x, y));
  28.                     }
  29.  
  30.                 }
  31.             }
  32.         }
  33.     }
  34. }
  35. 48 56
  36. 12 59
  37. 78 32
  38. 20 11
  39. 6 89
  40. -8 9
  41. 1011 101
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement