Horje
check if a string is a palindrome Code Example
check if a string is palindrome cpp
// Check whether the string is a palindrome or not.
#include <bits/stdc++.h>

using namespace std;

int main(){
    string s;
    cin >> s;
    
    int l = 0;
    int h = s.length()-1;

    while(h > l){
        if(s[l++] != s[h--]){
            cout << "Not a palindrome" << endl;
            return 0;
        }
    }
    cout << "Is a palindrome" << endl;
    return 0;

}
check if a string is a palindrome
int length = myString.Length;
for (int i = 0; i < length / 2; i++)
{
    if (myString[i] != myString[length - i - 1])
        return false;
}
return true;
what is palindrome
function Palindrome(str) { 

  str = str.replace(/ /g,"").toLowerCase();
  var compareStr = str.split("").reverse().join("");

  if (compareStr === str) {
    return true;
  } 
  else {
    return false;
  } 

}
check if palindrome
function isPalindrome(str) {
  str = str.toLowerCase();
  return str === str.split("").reverse().join("");
}




Csharp

Related
toggle unity c# Code Example toggle unity c# Code Example
c# next level script Code Example c# next level script Code Example
tooltip button winform Code Example tooltip button winform Code Example
reload usercontol wpf Code Example reload usercontol wpf Code Example
c# webclient post file Code Example c# webclient post file Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11