Question about Computers & Internet

1 Answer

18. A palindrome is a string that reads the same

18. A palindrome is a string that reads the same both forward and backward. Some examples are: “1234321”, “C”, “ABCBA”. Write a function that takes a string as an argument and returns 1 if the string is a palindrome and 0 otherwise.

Posted by on

Ad

1 Answer

  • Level 1:

    An expert who has achieved level 1.

    Hot-Shot:

    An expert who has answered 20 questions.

    Corporal:

    An expert that has over 10 points.

    Mayor:

    An expert whose answer got voted for 2 times.

  • Contributor
  • 40 Answers

Here is a little vbscript sample str=InputBox("Type String To check For palindrome","")
strR=StrReverse(str)
half=Int(Len(str)/2)
If Left(str,half)=Left(strR,half) Then
    MsgBox ("It's a palindrome string")
Else
    MsgBox ("It's not a palindrome string")
End If

Posted on Jun 06, 2010

Ad

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Ad

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

What is the palindrome of 49


palindromic numbers are simply ones that are the same if you right them normally or backwards 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 22, 33, 44, 55, 66, 77, 88, 99, 101, 111, 121, 131, 141, 151, 161, 171, 181, 191, 202, ...

A number is a palindrome or not, 49 is not one.

Sep 14, 2014 | Cars & Trucks

1 Answer

What's a palindrome


A word or phrase that reads the same backwards as forwards. See http://en.wikipedia.org/wiki/Palindrome

May 25, 2014 | Computers & Internet

1 Answer

Create a program that asks for a sentence. Your program will then check if the sentence is a palindrome or not.


Palindrome using C#.net

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
string str=string .Empty ;

Console.WriteLine("Enter a String");

string s = Console.ReadLine();

int i = s.Length;
//we can get the Length of string by using Length Property

for (int j=i -1; j >= 0; j--)
{
str = str + s[j ];
}
if (str == s)
{


Console.WriteLine(s + " is palindrome");


}
else
{
Console.WriteLine(s + " is not a palindeome");
}

Console.WriteLine(str);

Console.Read();


}

Nov 30, 2010 | Computers & Internet

2 Answers

I am also a palindrome.I am greater than the number of days in a year and less than the product of 19 and 20.What number am I?


the answer is between 356 and 380. a palindrome is a word or phrase that reads the same backward as forward. my guess would be 363.

Aug 10, 2010 | Capcom Zack and Wiki Quest for Barbaros'...

1 Answer

To find palindrome


// String s contains word to check
boolean palindrome = false;//always false until proven otherwise
int i=0;
int len = s.length();
int halflen = (int)len/2;
for (i=0;i<len/2;i++)
if (s.charAt(i)!=s.charAt(len-i-1))
break;
if (i==halflen)
palindrome=true;

Mar 21, 2009 | Sun Java Desktop System

1 Answer

To print palindrome


// String s contains word to check
boolean palindrome = false;//always false until proven otherwise
int i=0;
int len = s.length();
int halflen = (int)len/2;
for (i=0;i<len/2;i++)
if (s.charAt(i)!=s.charAt(len-i-1))
break;
if (i==halflen)
palindrome=true;

Mar 21, 2009 | Intel Computers & Internet

1 Answer

C++ programming


I hope this helps.
#include<stdio.h>
#include<conio.h>
#include<string.h>
void main()


{
clrscr();
char s[100];
int i,j,l,flag;
printf("\n enter a string:");
gets(s);
l = strlen(s);
j= l-1;
for(i=0;i<=j;i++,j--)


{
if(s[i]==s[j])


{
flag=1;
}
else
{ flag=0;
goto sar;
}
}
if(flag==1)


{
printf("\n string is palindrome");
}
else
sar:
printf("\n string is not a palindrome");
getch();
}

Sep 10, 2008 | Computers & Internet

1 Answer

C++


class Tester100
{

public static void main(String[] args)
{
for (int i =100; i<=999; i++)
System.out.println("palindrome"+=((i/100)+""+((i/10)%10)+""+(i%10)+""+((i/10)%10)+""+(i/100)));

}

Mar 21, 2008 | Computers & Internet

1 Answer

Help me javascript just mail me at ramzy_213@yahoo.com thanx


hello there!!!
First things First !
1) download the ultimate JAVA APL. run again.
O S

Feb 19, 2008 | Audio Players & Recorders

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

514 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Doctor PC
Doctor PC

Level 3 Expert

7733 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...