Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- int x = int.Parse(Console.ReadLine());
- int y = int.Parse(Console.ReadLine());
- if(reverseNumber(y) == x){
- Console.WriteLine("tak");
- } else {
- Console.WriteLine("nie");
- }
- Console.ReadKey();
- }
- static int reverseNumber(int number){
- char[] arr = number.ToString().ToCharArray();
- Array.Reverse(arr);
- return int.Parse(new string(arr));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement