Answered step by step
Verified Expert Solution
Question
1 Approved Answer
) : Detective Download detective.c here Or , copy these file ( s ) to your CSE account using the following command: $ 1 5
:
Detective
Download detective.c here
Or copy these files to your CSE account using the following command:
$ fetchactivity detective
Your mission if you choose to accept it is to complete the program
to decipher encoded messages.
Over the past few months UNSW Security Society has found seemingly normal messages paired with random numbers.
To help you solve this challenge we have created the program detective. that reads in the message and numbers,
storing them in a struct array.
We have been lucky enough to find one decoded message:
Encoded Message: muahahahawe'resoevil#GNTY
Secret Numbers:
Deciphered Message: hahaweareTeasiNGYou
Our observations from this are:
Messages seem to end with a
There are always the same number of letters as there are numbers.
Letters maintain their case between their encoded and deciphered message.
Each number is unique counting from to where is the number of letters
We wish you luck detective!
HINT:
By using the first secret number as an index into the encoded message we find the first letter of the secret
message. I wonder if this pattern can continue? Writing out each number and its associated letter may assist
in solving the cypher.
Examples AssumptionsRestrictionsClarifications
The maximum number of characters is
The number of characters in the encrypted message and the amount of secret numbers are the same.
The case of each letter is preserved in translation.
Messages will end with a
Detective
detective.c
This program was written by YOURNAMEHERE z
on INSERTDATEHERE
A program to decipher hidden messages in enemy codes.
#include
#define MAXSIZE
struct code
char letter;
int number;
;
int mainvoid
DO NOT CHANGE ANY OF THE CODE BELOW HERE
struct code messageMAXSIZE;
read in message
printfPlease enter Encrypted Message: ;
int i ;
char letter;
scanfc &letter;
while letter
messageiletter letter;
scanfc &letter;
i;
read in numbers
printfPlease enter Secret Numbers: ;
int j ;
int number;
scanfd &number;
messagejnumber number;
j;
while j i
scanfd &number;
messagejnumber number;
j;
DO NOT CHANGE ANY OF THE CODE ABOVE HERE
ONLY WRITE CODE BELOW HERE
TODO: Use the message array to reveal the secret message!
ONLY WRITE CODE ABOVE HERE
return ;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started