Advertisement
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 Sums_3_Numbers
- {
- class Sums_3_Numbers
- {
- static void Main(string[] args)
- {
- var a = int.Parse(Console.ReadLine());
- var b = int.Parse(Console.ReadLine());
- var c = int.Parse(Console.ReadLine());
- if ((a + b == c) && (a <= b)) Console.WriteLine("{0} + {1} = {2}", a, b, c);
- else if ((b + a == c) && (b <= a)) Console.WriteLine("{0} + {1} = {2}", b, a, c);
- else if ((a + c == b) && (a <= c)) Console.WriteLine("{0} + {1} = {2}", a, c, b);
- else if ((c + a == b) && (c <= a)) Console.WriteLine("{0} + {1} = {2}", c, a, b);
- else if ((b + c == a) && (b <= c)) Console.WriteLine("{0} + {1} = {2}", b, c, a);
- else if ((c + b == a) && (c <= b)) Console.WriteLine("{0} + {1} = {2}", c, b, a);
- else Console.WriteLine("No");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement