forked from mouredev/retos-programacion-2023
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request mouredev#4195 from 6d61726b/main
Reto mouredev#1 - C++
- Loading branch information
Showing
1 changed file
with
61 additions
and
0 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
Retos/Reto #1 - EL LENGUAJE HACKER [Fácil]/c++/6d61726b.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#include <iostream> | ||
#include <string> | ||
#include <map> | ||
|
||
using namespace std; | ||
|
||
int main() | ||
{ | ||
const map<char, string> LEET_SPEAK_ALPHABET = { | ||
{'a', "4",}, | ||
{'b', "I3",}, | ||
{'c', "[",}, | ||
{'d', ")",}, | ||
{'e', "3",}, | ||
{'f', "|=",}, | ||
{'g', "&",}, | ||
{'h', "#",}, | ||
{'i', "1",}, | ||
{'j', ",_|",}, | ||
{'k', ">|",}, | ||
{'l', "1",}, | ||
{'m', "/\\/\\",}, | ||
{'n', "^/",}, | ||
{'o', "0",}, | ||
{'p', "|*",}, | ||
{'q', "(_,)",}, | ||
{'r', "I2",}, | ||
{'s', "5",}, | ||
{'t', "7",}, | ||
{'u', "(_)",}, | ||
{'v', "\\/",}, | ||
{'w', "\\/\\/",}, | ||
{'x', "><",}, | ||
{'y', "j",}, | ||
{'z', "2",}, | ||
{'1', "L"}, | ||
{'2', "R",}, | ||
{'3', "E",}, | ||
{'4', "A",}, | ||
{'5', "S",}, | ||
{'6', "b",}, | ||
{'7', "T",}, | ||
{'8', "B"}, | ||
{'9', "g",}, | ||
{'0', "o"}, | ||
{' ', " "} | ||
}; | ||
|
||
string texto = ""; | ||
getline(cin, texto); | ||
|
||
for (char caracter : texto) | ||
{ | ||
auto iterador = LEET_SPEAK_ALPHABET.find(caracter); | ||
if (iterador != LEET_SPEAK_ALPHABET.end()) | ||
cout << iterador->second; | ||
} | ||
|
||
cout << endl; | ||
return 0; | ||
} |