mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2024-11-09 22:08:58 +01:00
27 lines
574 B
C#
27 lines
574 B
C#
|
using System;
|
||
|
|
||
|
namespace Solution
|
||
|
{
|
||
|
class Program
|
||
|
{
|
||
|
static void Main()
|
||
|
{
|
||
|
string line = Console.ReadLine();
|
||
|
line = line.ToLower().Replace(" ", "");
|
||
|
string reverse = "";
|
||
|
for (int index = line.Length - 1; index >= 0; index--)
|
||
|
{
|
||
|
reverse += line[index];
|
||
|
}
|
||
|
if (line == reverse)
|
||
|
{
|
||
|
Console.WriteLine("true");
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
Console.WriteLine("false");
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|