Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Palindrome String
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { string s, revs=""; s = "SMS"; for (int i = s.Length-1; i >=0; i--) //String Reverse { revs += s[i].ToString(); } if (revs == s) // Checking whether string is palindrome or not { Console.WriteLine("String is Palindrome \n Entered String Was {0} and reverse string is {1}", s, revs); } else { Console.WriteLine("String is not Palindrome \n Entered String Was {0} and reverse string is {1}", s, revs); } } } }
run
|
edit
|
history
|
help
0
Merging and sorting 2 arrays using LINQ
C# - string parsing
IEnumerable<T> generic interface implementation
New easy way to start lightweight threads
where index
swap using xor
P.I. Works
solution to problem #3 from projecteuler.net
Tarkov Time
Math 5.81