Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can someone help me figure out the code and find the best way to solve it ? #include #include cipher . h / / the
Can someone help me figure out the code and find the best way to solve it
#include
#include cipherh
the code below is shown only to get started
int mainvoid
string with initialization
char alphabet ZYXWVUTSRQPONMLKJIHGFEDCBA ;
array declaration to hold a string
of up to characters, plus character
char input;
char output
print the alphabet
we demarcate the string with quotation marks so space at
the start or end can be distinguished more clearly
printf
This is the alphabet: s
alphabet;
get input for the user
we demarcate the string with quotation marks so space at
the start or end can be distinguished more clearly
printf
This is the alphabet: s
alphabet;
get input fo the user
the scanf formatting read a string, including
the blank space before the would clear the buffer first
printf
enter a string:;
scanf
s input;
printf The string you entered was: s
input;
Examples; they are commented out since the functions are not implemented yet. They are included here to illustrate the function arguments and their use.
Substitution cipher: Encrypt the string input and put the result in output and put the result in output Use alphabet as the key.
ciphersubstitutioninput output, alphabet, ENCRYPT;
Enigma cipher: Encrypt the string input and put the result in output The key is
cipherenigmainputoutput,ENCRYPT;
As you create the library for ciphers.h this format will help
constant Do not modify these.
#define ENCRYPT
#define DECRYPT
write you function prototype declarations here for the following functions. Do not include the declarations of any other helper functions you may create.
stringlength
indexofchar
ciphersubstitution
cipherenigma
Thank you!
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