Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _05_Date_After_5_Days
- {
- class Program
- {
- static void Main(string[] args)
- //https://csharp-book.softuni.bg/chapter-08-exam-preparation.html
- {
- int a = int.Parse(Console.ReadLine());
- int b = int.Parse(Console.ReadLine());
- int c = int.Parse(Console.ReadLine());
- if (a + b == c)
- {
- if (b >= a)
- Console.WriteLine("{0} + {1} = {2}", a, b, c);
- else
- Console.WriteLine("{0} + {1} = {2}", b, a, c);
- }
- if (b + c == a)
- {
- if (b >= c)
- Console.WriteLine("{0} + {1} = {2}", c, b, a);
- else
- Console.WriteLine("{0} + {1} = {2}", b, c, a);
- }
- if (c + a == b)
- {
- if (c >= a)
- Console.WriteLine("{0} + {1} = {2}", a, c, b);
- else
- Console.WriteLine("{0} + {1} = {2}", c, a, b);
- }
- else
- {
- Console.WriteLine("No");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment