Advertisement
Shtiler

Pelindrom or not

Sep 26th, 2019
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp5
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int num1, num2, num3;
  14. Console.WriteLine("Please Enter The First Number");
  15. num1 = int.Parse(Console.ReadLine());
  16. Console.WriteLine("Please Enter The Second Number");
  17. num2 = int.Parse(Console.ReadLine());
  18. Console.WriteLine("Enter The Third Number");
  19. num3 = int.Parse(Console.ReadLine());
  20. bool Pelindrom = (num1 == num3);
  21. if (Pelindrom)
  22. {
  23. Console.WriteLine("This Is A Pelindrom!");
  24. }
  25. else
  26. {
  27. Console.WriteLine("This Isn't A Pelindrom");
  28. }
  29. Console.ReadLine();
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement