Question

C++ SOURCE CODE P0\/\/|\|3D. In the early 80s, hackers used to write in an obfuscated, but...

C++ SOURCE CODE P0\/\/|\|3D. In the early 80s, hackers used to write in an obfuscated, but mostly readable way called “leet” – short for “elite”. In essence, it was a simple character replacement algorithm, where a single “regular” character was replaced by one or more “leet” characters; numbers remained the same. Here’s one of the most readable versions: a 4 g 9 m /\\/\\ s $ y ‘/ b B h |-| n |\\| t 7 z Z c ( i 1 o 0 u U d D j j p P v \\/ e 3 k |< q Q w \\/\\/ f Ph l L r R x >< Note! You will need to know how to 1) get the length of a string (the number of characters) and 2) access individual characters of the string. See the appendix for more information. You must use at least one method in addition to main – preferably one that translates individual characters! Note #2: your first task should be to try to print out a single ‘\’ character… Sample run 1: Enter a string: you have been powned '/0U |-|4\\/3 B33|\\| P0\\/\\/|\\|3D Sample run 1: Enter a string: you have programming skrilz '/0U |-|4\\/3 PR09R4/\\/\\/\\/\\1|\\|9 $|

0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include<iostream>

using namespace std;

string translate(char letter)
{
   string leet[]={"4","B","(","D","3","Ph","9","|-|","1","j","|<","L","/\\/\\",
   "|\\|","0","P","Q","R","$","7","U","\\/","\\/\\/","><","'/","Z"};
   return leet[letter-97];
}

int main(){
   string line,leeted="";
   cout<<"Enter a string: ";
   getline(cin,line);
   for(int i=0;i<line.size();i++){
       if(line[i]>=97 && line[i]<=122){
           leeted+=translate(line[i]);
       }
       else
       leeted+=line[i];
   }
   cout<<leeted<<endl;
   return 0;
}

Add a comment
Know the answer?
Add Answer to:
C++ SOURCE CODE P0\/\/|\|3D. In the early 80s, hackers used to write in an obfuscated, but...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • IN JAVA. P0\/\/|\|3D. In the early 80s, hackers used to write in an obfuscated, but mostly...

    IN JAVA. P0\/\/|\|3D. In the early 80s, hackers used to write in an obfuscated, but mostly readable way called “leet” – short for “elite”.  In essence, it was a simple character replacement algorithm, where a single “regular” character was replaced by one or more “leet” characters; numbers remained the same.  Here’s one of the most readable versions: a 4 g 9 m /\\/\\ s $ y ‘/ b B h |-| n |\\| t 7 z Z c ( i...

  • Program 2: P0\/\/|\|3D. In the early 80s, hackers used to write in an obfuscated, but mostly...

    Program 2: P0\/\/|\|3D. In the early 80s, hackers used to write in an obfuscated, but mostly readable way called “leet” – short for “elite”. In essence, it was a simple character replacement algorithm, where a single “regular” character was replaced by one or more “leet” characters; numbers remained the same. Here’s one of the most readable versions: a 4 g 9 m /\\/\\ s $ y ‘/ b B h |-| n |\\| t 7 z Z c ( i...

  • Need in pseudocode Program 2: POWIN3D. In the early 80s, hackers used to write in an...

    Need in pseudocode Program 2: POWIN3D. In the early 80s, hackers used to write in an obfuscated, but mostly readable way called "leet" - short for "elite". In essence, it was a simple character replacement algorithm, whereya single "regular" character was replaced by one or more "leet" characters; numbers remained the same. Here's one of the most readable versions: g9m AS$y 00u | |р | P v II 9 IQ W LrRXI>< VI Note! You will need to know how...

  • C++ Concepts: Single-Dimension Array Write a program, using 25 or fewer lines of code, to count...

    C++ Concepts: Single-Dimension Array Write a program, using 25 or fewer lines of code, to count each occurrence of each lower-case letter in a string. Start your program by declaring a character array, msg, with a size of 30 or greater. char msg[MAX]; The user should then type a text string into the array: cin.getline(msg, MAX); Your program should now report the number of each character (a-z) found in the array: a face at the beach a - 4 b...

  • C Code Create a tool in which a user can enter a string (up to 25...

    C Code Create a tool in which a user can enter a string (up to 25 characters) and choose how they wish to manipulate the string from a menu your program will display (see the run-through). The program will continue to ask for commands until the user enters the “quit” command. The commands are: • “Replace All” If a user types “replace all” using ANY sort of capitalization, your program will prompt the user to enter the character to change...

  • C++ Programming Question: This programming assignment is intended to demonstrate your knowledge of the following: ▪...

    C++ Programming Question: This programming assignment is intended to demonstrate your knowledge of the following: ▪ Writing a while loop ▪ Write functions and calling functions Text Processing [50 points] We would like to demonstrate our ability to control strings and use methods. There are times when a program has to search for and replace certain characters in a string with other characters. This program will look for an individual character, called the key character, inside a target string. It...

  • Need this in C The starter code is long, if you know how to do it...

    Need this in C The starter code is long, if you know how to do it in other way please do. Do the best you can please. Here's the starter code: // ----------------------------------------------------------------------- // monsterdb.c // ----------------------------------------------------------------------- #include #include #include // ----------------------------------------------------------------------- // Some defines #define NAME_MAX 64 #define BUFFER_MAX 256 // ----------------------------------------------------------------------- // Structs typedef struct { char name[NAME_MAX]; int hp; int attackPower; int armor; } Character; typedef struct { int size; Character *list; } CharacterContainer; // ----------------------------------------------------------------------- //...

  • I need only one  C++ function . It's C++ don't write any other language. Hello I need...

    I need only one  C++ function . It's C++ don't write any other language. Hello I need unzip function here is my zip function below. So I need the opposite function unzip. Instructions: The next tools you will build come in a pair, because one (zip) is a file compression tool, and the other (unzip) is a file decompression tool. The type of compression used here is a simple form of compression called run-length encoding (RLE). RLE is quite simple: when...

  • 1. (20 points) A Vehicle Identification Number (VIN) is a unique code (e.g: 166AF55X6D8125409) used by...

    1. (20 points) A Vehicle Identification Number (VIN) is a unique code (e.g: 166AF55X6D8125409) used by the automotive industry to identify individual vehicles. Since 1981, each on-road vehicle built and sold in the United States typically (exceptional cases disregarded for the purpose of this exercise) is required to contain a 17-character VIN structured and constrained as follows: .A three-character (alpha-numeric) world manufacturer identifier (WMI). Exclude A five-character (alpha-numeric) vehicle descriptor (VD), Excludes I, O& Q . A single (numeric or...

  • I NEED HELP WITH DEBUGGING A C PROGRAM! PLEASE HEAR ME OUT AND READ THIS. I...

    I NEED HELP WITH DEBUGGING A C PROGRAM! PLEASE HEAR ME OUT AND READ THIS. I just have to explain a lot so you understand how the program should work. In C programming, write a simple program to take a text file as input and encrypt/decrypt it by reading the text bit by bit, and swap the bits if it is specified by the first line of the text file to do so (will explain below, and please let me...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT