PALINDROME STRING
************************************************************************
W.A.P TO CHECK GIVEN STRING IS PALINDROME STRING OR NOT
************************************************************************
JAVA Program
Output:
************************************************************************
C Program
Online Compiler
************************************************************************
C++ Program
Online Compiler
************************************************************************
C# Program
************************************************************************
PHP Program
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>
************************************************************************
PYTHON Program
************************************************************************
Comments
Post a Comment