Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int numar;
- numar = Convert.ToInt32(Console.ReadLine());
- int numarInitial, numarInvers = 0;
- numarInitial = numar;
- while(numar > 0)
- {
- int c = numar % 10;
- numarInvers = numarInvers * 10 + c;
- numar = numar / 10;
- }
- if (numarInitial == numarInvers)
- Console.WriteLine("Da");
- else
- Console.WriteLine("Nu");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement