473,472 Members | 2,224 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to find those word which give the same spelling from both site

43 New Member
I want to to find those word in array list which give the same spelling when we
spell out it from Right and left site.

For example.

like this word (Ababa)
if we spell out this word form Right and left site it give the same spelling

how should i do give me the best answer.
Apr 4 '10 #1
8 2318
tlhintoq
3,525 Recognized Expert Specialist
Loop through it one letter at a time
If start of string equals end of string
If start of string + 1 equals end of string -1
If start of string + 2 equals end of string -2
and so on
Apr 4 '10 #2
tlhintoq
3,525 Recognized Expert Specialist
please send the complete example,i did not understand.
Can anybody send me code to [...]
The Bytes volunteers are not here to write your code for you. This is not a free homework service.
Bytes is very much a "Give me a fish I eat for a day. Teach me to fish I eat for a lifetime" kind of place. Just giving you the code doesn't help you learn near as effectively as good old-fashioned trial and error.

Do a little reading up and experimenting then if your trials aren't doing what you expect, post the code and relevant messages/errors and we'll see what we can do to point you in the right direction for making it work.

Try hitting Google with terms of your programming language and primary terms of what you want to do. For example "C# custom events" or "VB datagrid Excel". I've found this to be a very effective tool.

May I suggest
  • First: Do some research. I heard about thing thing called Google, or books even.
  • Second: Do some experiments yourself. You will learn so much from actually trying it before throwing up your hands in defeat before even starting.
  • Third: Show the volunteers here the code that you created that was the closest to successful along with relevant errors.

Bytes has a policy regarding assisting students with their homework.

The short version is that the volunteers here can't help you with schoolwork.
A) We don't know what material you have and have not learned in class.
B) We don't know the guidelines you must follow.
C) In the long run giving you the answers actually short changes your education.

Hint 1: Try hitting Google with terms of your programming language and primary terms of what you want to do. For example "C# custom events" or "VB datagrid Excel". I've found this to be a very effective tool.
Hint 2: Your text book
Hint 3: Your instructor
Hint 4: Posting guidelines regarding homework assignments.
Apr 4 '10 #3
Rohullah
43 New Member
thats right,
But i try my best so many time, but with getting no souch resutl.
Apr 5 '10 #4
tlhintoq
3,525 Recognized Expert Specialist
I'm glad to read that you have been trying. Post your most successful code and maybe we can help point out your mistake, without completely violating our policy about helping with student homework.
Apr 5 '10 #5
Rohullah
43 New Member
Expand|Select|Wrap|Line Numbers
  1. Sub Main()
  2.         Dim array As String() = New String(0) {}
  3.         Console.Write("Enter Any Word: ")
  4.         For i As Integer = 0 To array.GetUpperBound(0)
  5.             'Console.Write("The output is {0}", array(i))
  6.             array(i) = Console.ReadLine()
  7.             Console.Write("{0}", array(i))
  8.  
  9.         Next
  10.         Console.ReadLine()
  11.     End Sub
-----------------------------------
this is the code, now i want to apply Condition that if the word is = give the same spelling from both right and left site then do this and ETC.
Apr 5 '10 #6
tlhintoq
3,525 Recognized Expert Specialist
Where is your effort to see if the word is the same back-to-front as front-to-back?

You said you had tried many different ways but none worked. Show me a couple examples of what you tried/coded.
Apr 5 '10 #7
Rohullah
43 New Member
i want ot find those word which give the same spelling from both right and left site

this is the effort that i do
---------------------------------------------
Expand|Select|Wrap|Line Numbers
  1. Dim array1 As Char() = New Char(0) {}
  2.         For i As Integer = 0 To array1.GetUpperBound(0)
  3.             Console.Write("Enter Any Name [{0}]: ", i + 1)
  4.             array1(i) = Console.ReadLine()
  5.             If (array1.GetLowerBound(0)) = array1.GetUpperBound(0) _
  6.                 And (array1.GetLowerBound(0) + 1) = (array1.GetUpperBound(0) - 1) _
  7.                 And (array1.GetLowerBound(0) + 2) = (array1.GetUpperBound(0) - 2) _
  8.                 And (array1.GetLowerBound(0) + 3) = (array1.GetUpperBound(0) - 3) _
  9.                 And (array1.GetLowerBound(0) + 4) = (array1.GetUpperBound(0) - 4) Then
  10.                 Console.Write("The spelling is the same form both left and right site")
  11.             Else
  12.                 Console.Write("The spelling is not the same form both left and right site")
  13.             End If
  14.         Next
  15.         Console.ReadLine()
-------------------------------------------
it give the same message for both (IF and Else)condition =(the spelling is not the same from both right and left site.

please help me.looking forword
Apr 6 '10 #8
Frinavale
9,735 Recognized Expert Moderator Expert
Find the mid point in your String.
To do this, use the String.Length property and divide it by 2 to get to the middle.

Now you can implement recursive method to do this or you can use a loop..but essentially you want to check the last element in the string and compare it to the first element in the string....if they match you want to compare the second last element in the array to the second element in the array...if they match then compare the ....

You get the point.

Your logic should look like (pseudo code):
Expand|Select|Wrap|Line Numbers
  1. midPoint = myString.Length/2
  2.  
  3. If(midpoint>0)
  4.   counterDown = myString.Length
  5.   counterUp = 0
  6.   for counterUp to midPoint increment counterUp by 1
  7.     if myString.SubString(counterUp) 
  8.     is not equal to myString.SubString(counterDown) 
  9.         exit the loop because they don't match.
  10.    end if
  11.   loop
  12.  
-Frinny
Apr 13 '10 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Tony Roost | last post by:
I have created a test VB.Net form that will use MS Word to check the spelling of text in an input box The test application runs without a problem and I quit the word application at the end of the...
4
by: ray | last post by:
I am trying to use a word doc in access and am trying to create a database around this preconfigured form. pleas help
3
by: svdh2 | last post by:
I have been looking at a problem the entire week in access, I have still not been able to find a solution. Hope that you could maybe tell where to look Concerns the link between Access and Word....
8
by: jquest | last post by:
Hi Again; I have had help from this group before and want to thank everyone, especially PCDatasheet. My database includes a field called HomePhone, it uses the (xxx)xxx-xxx format to include...
8
by: Frost | last post by:
Hi All, I am a newbie i have written a c program on unix for line by line comparison for two files now could some one help on how i could do word by word comparison in case both lines have the...
13
by: usenet | last post by:
How and where can one find out about the basics of VB/Access2003 syntax? I am a died in the wool C/C++/Java Linux/Unix programmer and I am finding it difficult to understand the program format...
3
by: Middletree | last post by:
At first glance, the question in the subject line seems way too easy. But I am finding some situations in my app where the value in a variable is some sort of blank-like value, such as Null or...
1
by: vmoreau | last post by:
I have a text and I need to find a Word that are not enclosed in paranthesis. Can it be done with a regex? Is someone could help me? I am not familar with regex... Example looking for WORD:...
9
by: Kernel Bling | last post by:
Hi Everyone, This Saturday the stage was set. The problem simply could not go on existing -- it had to be solved. Many hours, articles, compilations and frustrations later I still did not find...
0
by: progvar | last post by:
hi i am getting probleum in converting a spell check progrma made in vb 6.0 and Ms-office Word into OpenOffice Word when i made spell check program in Ms-Word and vb 6.0 it works fine but i use...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.