![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
|
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[]){
char string[80] = "";
char new_string[80] = "";
int counter;
for(counter = 1; counter < argc; counter++){
strcat(string, argv[counter]);
strcat(string, " ");
}
convert(string, new_string);
printf("%s", new_string);
}
convert(char *string, char *new_string){
int counter;
for(counter = 0; counter < strlen(string); counter++){
switch(string[counter]){
case 'A':
new_string[counter] = '4';
break;
case 'a':
new_string[counter] = '4';
break;
case 'B':
new_string[counter] = '8';
break;
case 'b':
new_string[counter] = '8';
break;
case 'E':
new_string[counter] = '3';
break;
case 'e':
new_string[counter] = '3';
break;
case 'L':
new_string[counter] = '1';
break;
case 'l':
new_string[counter] = '1';
break;
case 'O':
new_string[counter] = '0';
break;
case 'o':
new_string[counter] = '0';
break;
case 'S':
new_string[counter] = '5';
break;
case 's':
new_string[counter] = '5';
break;
case 'T':
new_string[counter] = '7';
break;
case 't':
new_string[counter] = '7';
break;
default:
new_string[counter] = string[counter];
break;
}
}
}http://www.tsargoth.com/kylixen/leet.c Just for kicks ![]()
__________________
ALLOW IMAGES IN SIGNATURES NOW |
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() ![]() |
Hmmm. Just nosing around on your site... noticed you liked my avatar...
![]() http://www.tsargoth.com/kylixen/images/owned1.jpg So what is this code below suppose to do?
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#3 | |
|
Programmer
|
Quote:
![]() ./leet I love candy
__________________
ALLOW IMAGES IN SIGNATURES NOW |
|
|
|
|
|
|
#4 |
|
Hobbyist Programmer
|
Haha...you must've gotten bored today.
![]() Cool prog. B)
__________________
"Time is an illusion. Lunchtime doubly so." -the late, great Douglas Adams |
|
|
|
|
|
#5 |
|
PFO Founder
![]() ![]() |
wow you must have been bored i just compiled and ran it. great work tho
![]()
__________________
BIG K aka Kyle Programming Forums Kyle K Online Please do not PM or email me programming questions. Post them in the forums instead. |
|
|
|
|
|
#6 |
|
Expert Programmer
|
Haha... I wrote that script once for mIRC (only to annoy people)
![]()
__________________
Clifford Matthew Roche <geek@cliffordroche.com> Web Hosting: http://www.crd-hosting.com Consulting: http://www.crdev-consulting.com |
|
|
|
|
|
#7 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Try:
case 'A':
case 'a':
new_string[counter] = '4';
break;Wouldn't this reduce the amount of code? |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|