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
Programmes
масиви форіч
C# - Integer to Roman
asdfsdgghjghkhj
Testing 9
Fórum Mimicking Array Names Being Defined at Runtime
Hello Demo
1 through 1000
Celsius to Kelvin / Kelvin to Celsius
Problem: rstring