Results 1 to 8 of 8
Thread: comparing array using character
- 10-02-2008, 10:37 AM #1
comparing array using character
hey guys! I need help...
how can I compare two sets of character type array....:confused:
I really need it...
well the problem given to me is to that the user should give two names, one for boy and the othe for a girl...then I have to compare each letters...if any letter is the same then it should be added...that the problem given to me...
the output will be:
name of the guy:
name of girl:
number of same letters:
Last edited by Anseki; 10-02-2008 at 11:26 AM. Reason: to be more specific
- 10-02-2008, 01:23 PM #2
- 10-03-2008, 01:23 AM #3
comparing the letters of each names given
When someone asks "what have you done up to now", that's usually a sign that you should post your code. You should also include in this code a region where you try to solve the problem at hand and indicate this location with a comment in your code.
Also, if you do post your code, please use code tags so that your code will be well-formatted and readable. To do this, either highlight your code block and press the "code" button at the top above the message block or place the tag [code] at the top of your block of code and the tag [/code] at the bottom, like so:
[code] // your code block goes here // notice that the top and bottom tags are different here [/code]
- 10-03-2008, 04:37 AM #5Senior Member
- Join Date
- Sep 2008
- Rep Power
you should also explain the exact behavior.
- 10-03-2008, 05:20 AM #6
- 10-03-2008, 01:53 PM #7Member
- Join Date
- Oct 2008
- Rep Power
i will give you the pseudocode
if (array1[i] == array 2[i])
- 10-03-2008, 08:28 PM #8
First of all you have to get two names from the user and store them in char arrays. Then referencing to one array loop through the next array. In each completed cycle of the second array, increase the reference by one in the first array.
- By souFrag in forum Advanced JavaReplies: 5Last Post: 05-21-2008, 10:03 AM
- By raj reddy in forum JavaServer Pages (JSP) and JSTLReplies: 5Last Post: 04-18-2008, 08:42 AM
- By Feng in forum New To JavaReplies: 2Last Post: 11-23-2007, 10:40 AM
- By bugger in forum New To JavaReplies: 2Last Post: 11-09-2007, 09:54 PM
- By pegitha in forum Web FrameworksReplies: 1Last Post: 05-18-2007, 07:23 PM