Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Globalization;
- using System.Linq;
- using System.Numerics;
- using System.Text;
- using System.Threading.Tasks;
- namespace Test
- {
- class ThreeEqualNumber
- {
- static void Main()
- {
- string a = Console.ReadLine();
- string b = Console.ReadLine();
- string c = Console.ReadLine();
- int maxLength = Math.Max(a.Length , Math.Max(b.Length , c.Length));
- bool areEqual = true;
- a = a.PadRight(maxLength , '0');
- b = b.PadRight(maxLength , '0');
- c = c.PadRight(maxLength , '0');
- for(int i = 0; i < maxLength; i++)
- {
- if(a[i]!= b[i] || b[i]!=c[i])
- {
- areEqual = false;
- }
- }
- if(areEqual)
- {
- Console.WriteLine("yes");
- }
- else
- {
- Console.WriteLine("no");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement