Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int min = 0;
- for (int i = 0; i < 3; i++)
- {
- string userInput = Console.ReadLine();
- string[] values = userInput.Split(' ');
- int currentMin = Convert.ToInt32(values[1]) - Convert.ToInt32(values[0]);
- if (currentMin < min || i == 0)
- {
- min = currentMin;
- }
- }
- Console.WriteLine(min);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement