Click here to Skip to main content
15,917,709 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have an assignment that is due tomorrow that I absolutely have no clue what it means at all ugh this is super hard I feel like they just ask for random sh*t that didn't even get explained in the module and its the weekend so I can't even msg my professor to ask him can someone explain what exactly this assignment means?
Part 3: Write a function called To1337Speak(). Convert a c-style string into 1337 speak. Look for the terminating character to find the end of the string.

Conversion table:

a 4

e 3

t 7

i !

l 1

o 0

g 9

s 5

What I have tried:

to be honest, I haven't done anything I've researched c style convert into but nothing came up copied and pasted the assignment question under google as well and nothing came up either
Posted
Updated 15-Jul-16 21:36pm
Comments
PIEBALDconsult 16-Jul-16 2:09am    
You don't actually want to "convert"; you just need a dictionary (of some sort) and then do character replacements.
In fact, it can be a lot simpler than that. It is closely related to a simply character-replacement cypher such as Caesar Cypher or ROT-13.
Most anyone here could do that in a matter of minutes, but as it's a homework assignment, you are unlikely to get much help.
_You_ are supposed to do it. _You_ should have asked your teacher for help. You sould _not_ have left it for the last minute.

1 solution

Don't swear. Don't just go "it's not in the notes".
Read the question and think about it - it's pretty obvious if you do what they want you to do.
They want you to read a C-style string (i.e. a sequence of char values which is terminated by a null character '\0') and convert some of the characters to l337 speak.
So "hello" becomes "h3110" and so forth.
All you need to do is read the string in, loop through each character and replace it from the list in the question, stopping when you reach the null. Then print it.
Simple!

So give it a try - it's not as complicated as you think.
 
Share this answer
 
Comments
[no name] 25-Aug-16 9:56am    
- So give it a try - it's not as complicated as you think.

... says the old l33t hax0r :-)
OriginalGriff 25-Aug-16 10:16am    
And you rerunning "the best of OG" or something? :laugh:
[no name] 25-Aug-16 10:26am    
Just stumbled over it and could not resist.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900