Question: 9 , Task 3 It turns out the email was from the elite Cyber Sleuths League ( CSL ) . Since you passed with flying
Task
It turns out the email was from the elite Cyber Sleuths League CSL Since you passed with flying colours you have just been recruited to join their team. Your first mission is to infiltrate the highly secure servers of Code Brew the company you were unjustly fired from due to a mysterious conspiracy.
You have a personal vendetta, yes, but the stakes are higher: inside Code Brew's servers lies critical evidence that can expose a cyber syndicate's misdeeds. You must use your coding skills to crack the password and retrieve the evidence before it's too late,
You vaguely remember the password format, and it's up to you to put the pieces together. Think of it as a game of Wordle, where each correct guess brings you closer to the full password.
You are given this Taskcpp file, it contains your main loop: SubTask : Char
You have been given a Char.h and Char.cpp file, it contains the function char findNext Charchar current and char findCharchar target, char current
char findNextChar Function:
This function returns the next ASCII character. It also checks if the current character is the last in its respective case range or
If current is it wraps around and returns to start with uppercase letters.
If current is it wraps around and returns to cycle back to lowercase letters.
If neither, it simply progresses to the next character in the ASCII sequence and returns that character.
This must be done using ternary if statements
char findChar Function:
This function finds a target character starting from the given current character.
It checks if the current character is the target character.
a If they match, the current character is returned as the result.
b If no match, the function calls itself with the target and the result of findNextCharcurrent
This implementation uses ternary if statements to determine progression or match conditions.
SubTask : Int
You have been given a Int.h and Int.cpp file, it contains the function char convertCharint character and int findint int target, int current
findInt Function:
This function finds a target integer starting from the given current integer.
It checks if the current integer is the target integer.
a If they match, the current integer is returned as the result.
b If they do not match, the function calls itself with the target and current
This implementation uses ternary if statements to increment the current integer until the target is matched.
convertChar Function
This function converts an integer to its corresponding ASCII character.
The function takes an integer character which represents a digit from to
It returns the ASCII character equivalent by adding to the integer. This converts the integer to a character ranging from to
This conversion is straightforward and does not involve conditional logic but relies on the ASCII standard where the digits are sequentially ordered.
SubTask : SpecialChar
You have been given a SpecialChar.h and Special.cpp file, it contains the function char findSpecialCharchar target, int current
findSpecialChar Function:
This function finds a target special character in the ASCII table, starting from a given current ASCII value
It checks if the current ASCII value matches the target character's ASCII code.
a If they match, the current ASCII character is returned as the result, effectively identifying the target character.
b If they do not match, the function calls itself with the target character and the next ASCII value current
This method utilizes ternary if statements to increment the current value until the target character's ASCII code is matched.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
