string manipulation

Bad threads go here

string manipulation

Post by karom on Sun Jul 10, 2011 3:44 am
([msg=59612]see string manipulation[/msg])

Post removed; spoilers
karom
New User
New User
 
Posts: 2
Joined: Sun Jul 10, 2011 3:38 am
Blog: View Blog (0)


Re: string manipulation

Post by Assassian360 on Sun Jul 10, 2011 9:26 am
([msg=59615]see Re: string manipulation[/msg])

Better than saying "Here is code... Fix it for me!". It would be better if you described even briefly the answers to these questions:

1) What is it supposed to do?

2) What is the expected output?

3) What are any known issues? (if there are any)

You'll find people (eg, me) more willing if you put a little more effort into the question.
Assassian360
Poster
Poster
 
Posts: 135
Joined: Sat Jun 26, 2010 1:37 am
Blog: View Blog (0)


Re: string manipulation

Post by karom on Sun Jul 10, 2011 12:12 pm
([msg=59619]see Re: string manipulation[/msg])

I thought the code does the right thing.
This level is about string manipulation.
In this challenge, you will be given a string. Take all the numbers from the string and classify them as composite numbers or prime numbers. You should assume all numbers are one digit, and neither number 1 nor number 0 counts. Find the sum of every composite number, then find the sum of every prime number. Multiply these sums together. Then, take the first 25 non-numeric characters of the given string and increment their ASCII value by one (for example, # becomes $). Take these 25 characters and concatenate the product to them. This is your answer.
Your answer should look like this: oc{lujxdpb%jvqrt{luruudtx140224

Output: zdvxmko@iksz$lmqyfow@tevv101528
Code: Select all
zdvxmko@iksz$lmqyfow@tevv101528
oc{lujxdpb%jvqrt{luruudtx140224


What is the expected output? The correct answer
What is it supposed to do? It should output the answer
karom
New User
New User
 
Posts: 2
Joined: Sun Jul 10, 2011 3:38 am
Blog: View Blog (0)


Re: string manipulation

Post by mShred on Sun Jul 10, 2011 12:31 pm
([msg=59621]see Re: string manipulation[/msg])

karom wrote:What is the expected output? The correct answer
What is it supposed to do? It should output the answer

No shit.

karom wrote:I thought the code does the right thing.

From this alone, I'm going to assume you probably found this code online from Google or something and decided to test it out. You don't even attempt to tell us anything, and you're being excruciatingly demanding. This is a turn off for people who would want to help you, like me and Assassian. You in no way even try to tell us what language you supposedly wrote this is. You probably don't even which one it is.
You give us no information, and demand an answer. I'd be more than willing to help if you asked for specifics. But like Assassian said nicely, we're not your bitches.
Image

For those about to rock.
User avatar
mShred
Administrator
Administrator
 
Posts: 1742
Joined: Tue Jun 22, 2010 4:22 pm
Blog: View Blog (2)



Return to Graveyard

Who is online

Users browsing this forum: No registered users and 0 guests