| Author |
Message |
Bigger_Brother I_like_Pi Jailed

Joined: 09 Feb 2009 Posts: 364
HP: 0 MP: 6 Lives: 0
|
Posted: Sun Apr 26, 2009 3:28 pm
|
|
|
xD, HTML and Javascript pVVn3d u!
using System; using System.Collections.Generic; using System.Text;
namespace ConsoleApplication2 { class Program { static void nerr(string userImput) { string newstring=string.Empty; for(int i=0; i < userImput.Length; i++){ switch(userImput[i]) { case '@': newstring+='a'; break; case '<': newstring+='c'; break; case '3': newstring+='e'; break; case '9': newstring+='g'; break; case 'I': newstring+='i'; break; case ';': newstring+='j'; break; case '1': newstring+='l'; break; case '0': newstring+='o'; break; case '6': newstring+='q'; break; case '5': newstring+='s'; break; case '7': if (i < (userImput.Length - 1)) { if (userImput[i + 1] == '_') { newstring += 'z'; i += 1; break; } } newstring += 't'; break; case '|': if (i < (userImput.Length-1)) { if (userImput[i + 1] == '}') { newstring += 'b'; i += 1; break; } if (userImput[i + 1] == '<') { newstring += 'k'; i += 1; break; } if (userImput[i + 1] == '*') { newstring += 'p'; i += 1; break; } if (userImput[i + 1] == ')') { newstring+='d'; i+=1; break; } if (userImput[i + 1] == '=') { newstring += 'f'; i += 1; break; } if (userImput[i + 1] == '-') { if (i < (userImput.Length - 2)) { if (userImput[i + 2] == '|') { newstring += 'h'; i += 2; break; } else { newstring += userImput[i]; break; } } else { newstring += userImput[i]; break; } } if (userImput[i + 1] == '\\') { if (i < (userImput.Length - 2)) { if (userImput[i + 2] == '|') { newstring += 'n'; i += 2; break; } else { newstring += userImput[i]; break; } } else { newstring += userImput[i]; break; } } if (userImput[i + 1] == '^') { newstring += 'r'; i += 1; break; } else { newstring += userImput[i]; break; } } else { newstring += userImput[i]; break; } case '>': if (i < (userImput.Length - 1)) { if (userImput[i + 1] == '<') { newstring += 'x'; i += 1; break; } if (userImput[i + 1] == '/') { newstring += 'y'; i += 1; break; } else { newstring += userImput[i]; break; } } else { newstring += userImput[i]; break; } case '(': if (i < (userImput.Length - 1)) { if (userImput[i + 1] == '_') { if (i < (userImput.Length - 2)) { if (userImput[i + 2] == ')') { newstring += 'u'; i += 2; break; } } } } newstring += userImput[i]; break; case '\\': if (i < (userImput.Length - 1)) { if (userImput[i + 1] == '/') { newstring += 'v'; i += 1; break; } if (userImput[i + 1] == '|') { if (i < (userImput.Length - 2)) { if (userImput[i + 2] == '/') { if (i < (userImput.Length - 3)) { if (userImput[i + 3] == '|') { newstring += 'w'; i += 3; break; } } } } } } newstring += userImput[i]; break; case'/': if (i < (userImput.Length - 1)) { if (userImput[i + 1] == '|') { if (i < (userImput.Length - 2)) { if (userImput[i + 2] == '/') { if (i < (userImput.Length - 3)) { if (userImput[i + 3] == '|') { newstring += 'm'; i += 3; break; } } } } } } newstring += userImput[i]; break; default: newstring += userImput[i]; break; }
} Console.WriteLine(newstring); } static void l33t(string userImput) { string newstring=string.Empty; foreach (char ch in userImput) { switch (ch) { case 'a': newstring +='@'; break; case 'b': newstring += "|}"; break; case 'c': newstring += "<"; break; case 'd': newstring += "|)"; break; case 'e': newstring += "3"; break; case 'f': newstring += "|="; break; case 'g': newstring += '9'; break; case 'h': newstring += "|-|"; break; case 'i': newstring += 'I'; break; case 'j': newstring += ';'; break; case 'k': newstring += "|<"; break; case 'l': newstring += '1'; break; case 'm': newstring += "/|/|"; break; case 'n': newstring += "|\\|"; break; case 'o': newstring += '0'; break; case 'p': newstring += "|/*"; break; case 'q': newstring += '6'; break; case 'r': newstring += "|^"; break; case 's': newstring += '5'; break; case 't': newstring += '7'; break; case 'u': newstring += "(_)"; break; case 'v': newstring += "\\/"; break; case 'w': newstring += "\\|/|"; break; case 'x': newstring += "><"; break; case 'y': newstring += ">/"; break; case 'z': newstring += "7_"; break; default: newstring += ch; break;
} } Console.WriteLine(newstring); } static void Main(string[] args) { Console.WriteLine("Enter some text!"); string userImput = Console.ReadLine(); userImput = userImput.ToLower(); Console.WriteLine("Type \'1337\' to convert text into 1337!\nType \'nerr\' to convert text into nerr!"); string resp = Console.ReadLine(); if (resp == "1337") { l33t(userImput); } else { if (resp == "nerr") { nerr(userImput); } else { Console.WriteLine("Sorry, that is an invalid imput."); } } Console.WriteLine("Credit to Taras Kolomatski.\nPress any key to exit."); Console.ReadKey(); } } } |
|
| Back to top |
|
 |
wat MeowMixer Vampire
Joined: 18 Apr 2007 Posts: 8234
HP: 85 MP: 0 Lives: 0
|
Posted: Sun Apr 26, 2009 3:32 pm
|
|
|
|
There's already over 9000 of these in existence. |
|
| Back to top |
|
 |
Elzilcho ohclizlE Burning Vampire
Joined: 08 Oct 2007 Posts: 6715
HP: 94 MP: 5 Lives: 0
|
Posted: Sun Apr 26, 2009 3:50 pm
|
|
|
|
cool story bro |
|
| Back to top |
|
 |
Bigger_Brother I_like_Pi Jailed

Joined: 09 Feb 2009 Posts: 364
HP: 0 MP: 6 Lives: 0
|
Posted: Sun Apr 26, 2009 3:56 pm
|
|
|
xD, HTML and Javascript pVVn3d u!
OOPS, forgot to add the 'P'.
| Quote: | if (userImput[i + 1] == '*') { newstring += 'p'; i += 1; break; |
Add at line 140! |
|
| Back to top |
|
 |
God of Retro (apparently) MattTheSpratt
Joined: 09 Apr 2008 Posts: 1533
HP: 34 MP: 4 Lives: 1
|
Posted: Sun Apr 26, 2009 4:03 pm
|
|
|
| I_like_Pi wrote: | xD, HTML and Javascript pVVn3d u!
OOPS, forgot to add the 'P'.
| Quote: | if (userImput[i + 1] == '*') { newstring += 'p'; i += 1; break; |
Add at line 140! | Or edit your original post. :\ |
|
| Back to top |
|
 |
Bartz Klauser BAMFing ARCHER Werewolf
Joined: 27 Sep 2007 Posts: 7637
HP: 100 MP: 5 Lives: 4
|
Posted: Sun Apr 26, 2009 4:27 pm
|
|
|
|
That fails. I can write a 58 line variant using Java. Maybe 59-62 due to spacing. |
|
| Back to top |
|
 |
jacking off Small Sammer Guy
Joined: 13 May 2007 Posts: 12146
HP: 10 MP: 2 Lives: 0
|
Posted: Sun Apr 26, 2009 4:28 pm
|
|
|
|
too much...can you keep it simple? |
|
| Back to top |
|
 |
Negi-chama Super Tsuki Vampire
Joined: 31 Jul 2007 Posts: 40464
HP: 100 MP: 0 Lives: 0
|
Posted: Sun Apr 26, 2009 4:29 pm
|
|
|
|
Page stretch. Seriously, you should have put a [page stretch warning] in the title. :/ |
|
| Back to top |
|
 |
jacking off Small Sammer Guy
Joined: 13 May 2007 Posts: 12146
HP: 10 MP: 2 Lives: 0
|
Posted: Sun Apr 26, 2009 4:31 pm
|
|
|
| Tsuki wrote: | | Page stretch. Seriously, you should have put a [page stretch warning] in the title. :/ |
Its not page stretch. Its just damn huge |
|
| Back to top |
|
 |
Bartz Klauser BAMFing ARCHER Werewolf
Joined: 27 Sep 2007 Posts: 7637
HP: 100 MP: 5 Lives: 4
|
Posted: Sun Apr 26, 2009 4:32 pm
|
|
|
|
And this, my friends, is why I use Java for programming. |
|
| Back to top |
|
 |
Negi-chama Super Tsuki Vampire
Joined: 31 Jul 2007 Posts: 40464
HP: 100 MP: 0 Lives: 0
|
Posted: Sun Apr 26, 2009 4:35 pm
|
|
|
| Nel wrote: | | Tsuki wrote: | | Page stretch. Seriously, you should have put a [page stretch warning] in the title. :/ |
Its not page stretch. Its just damn huge | Eh, I guess you're right. I mean, he (most likely) put effort into it. I'm just in an assy mood I guess. I KNOW HOW TO CURE THAT! TAKE MY STRESS OUT ON HOMEWORK! ... homework ;; |
|
| Back to top |
|
 |
Bigger_Brother I_like_Pi Jailed

Joined: 09 Feb 2009 Posts: 364
HP: 0 MP: 6 Lives: 0
|
Posted: Sun Apr 26, 2009 6:11 pm
|
|
|
| Bartz Klauser wrote: | | And this, my friends, is why I use Java for programming. |
xD, HTML and Javascript pVVn3d u!
Agreed, C# was made to rip of java (which I have no exp. with), which is superior to the other programing languages, so it takes many points, but not all, like pro array definitions. Since my goal was to learn C#, that's what I did. Well... I could have made a multidimensinal array....
BTW: IT WAS SO TEDIOUS! *CRAG* took two hours! |
|
| Back to top |
|
 |
Nastasia
Joined: 13 May 2007 Posts: 8479
HP: 100 MP: 0 Lives: 1
|
Posted: Sun Apr 26, 2009 6:20 pm
|
|
|
why did you have to make it some huge code couldn't you just have made it a list, like "@= A, <=C, 3=E, etc". it would be a lot shorter and easier to read |
|
| Back to top |
|
 |
Sync MALAK
Joined: 01 Aug 2007 Posts: 34747
HP: 10 MP: 2 Lives: 0
|
Posted: Sun Apr 26, 2009 6:23 pm
|
|
|
|
I would say something but I cramp shit up like this almost all the time. |
|
| Back to top |
|
 |
|