Advertisement
Guest User

1

a guest
Jun 22nd, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1.  static void Main(string[] args)
  2.         {
  3.             String x;
  4.             String y;
  5.  
  6.             x = Console.ReadLine();
  7.             y = Console.ReadLine();
  8.  
  9.             if (x.Length == y.Length) { Console.WriteLine("OK"); }
  10.  
  11.             if (x.Length < y.Length)
  12.             {
  13.                 while (x.Length != y.Length)
  14.                 {
  15.                     x = "0" + x;
  16.                 }
  17.                 Console.WriteLine(x);
  18.             }
  19.  
  20.             if (x.Length > y.Length)
  21.             {
  22.                 while (x.Length != y.Length)
  23.                 {
  24.                     y = "0" + y;
  25.                 }
  26.                 Console.WriteLine(y);
  27.             }
  28.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement