/* © MATTO MATTI 2018 http://mattomatti.com/pl/a0186 napisane przy użyciu Visual Studio Community 2015 2018-12-16 v 1.0 */ using System; namespace plcode1cs { class Program { static int wspak(int a) { int awspak = 0; while (a > 0) { awspak *= 10; awspak += a % 10; a /= 10; } return awspak; } static int dodajSpecjalnie(int a, int b) { if (a > b) { a = wspak(a); } if (a < b) { b = wspak(b); } return a + b; } static void Main(string[] args) { Console.Write("Podaj liczby\n a = "); int a = Convert.ToInt32(Console.ReadLine()); Console.Write(" b = "); int b = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("wynik = {0}", dodajSpecjalnie(a, b)); Console.ReadKey(); } } }