PALINDROME STRING

 

 

************************************************************************ 

W.A.P TO CHECK GIVEN STRING IS PALINDROME STRING OR NOT

************************************************************************ 

JAVA Program







   



  
Online compiler

Output:


************************************************************************ 

C Program



Online Compiler 

 

************************************************************************ 

C++ Program

Online Compiler

************************************************************************ 

C# Program


 
 
Output:

************************************************************************ 

PHP Program


Online Compiler

Php is a serverside scripting language.

************************************************************************ 

JAVASCRIPT Program

 <script type="text/javascript">


var string = prompt("Please enter a string: ");
var stringArray = string.split('');
var stringArrayRev = stringArray.reverse();
var revString = stringArrayRev.join('');

if (string == revString)
{
  console.log(`${string}: is panildrome`);  
}
else{
  console.log(`${string}: is not panildrome`);  
}
</script>

Online Compiler

************************************************************************ 

PYTHON Program

 

Online Compiler: 

************************************************************************  



Comments

Popular posts from this blog

SAME NAME IN CLASS METHOD AND CONSTRUCTOR

PALINDROME NUMBER

FIBONACCI SERIES