Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace pandora
- {
- class Program
- {
- static void Main(string[] args)
- {
- string word = Console.ReadLine();
- string reversed=word;
- int counter=0;
- for (int i = 0 ,j=word.Length-1; i < word.Length; i++,j--)
- {
- if (reversed[j] == word[i])
- {
- counter++;
- }
- }
- if (counter==word.Length)
- {
- Console.WriteLine("its a palindrome dude");
- }
- else Console.WriteLine("no");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement