Question
INSTRUCTIONS (i already did the algorithm) i need help with a index and offset table for the message problemsolvingisfun algorithm: START GET OFFSET_TABLE INITIALIZE MESSAGE,
INSTRUCTIONS (i already did the algorithm) i need help with a index and offset table for the message "problemsolvingisfun"
algorithm:
START GET OFFSET_TABLE
INITIALIZE MESSAGE, USER_NUM, OFFSET_NUM ENCRYPTED
PRINT "ENTER MESSAGE"
GET MESSAGE PRINT TENER ENCRYPTION "KEY"
GET USER-NUM
DO UNTIL USER NUM == OFFSET_TABLE_INDEX
COMPARE USER__NUM WITH OFSET_TABLE INDEX
IN OFFSET_TABLE
IF USEINUM == OFFSET_TABLE_INDEX
SET OFFSET _NUM = OFFSET_TABLE_OFFSET
END
DO IT UNTIL THE MESSAGE END
GET THE CHARACTER IN THE MESSAGE
ADD OFFSET - NUM TO CHARACTER
STORE NEW CHARACTER IS ENCRYPTED
MOVE TO THE NEXT CHARACTER
END DO
PRINT ENCRYPTED
START GET OFFSET_TABLE
INITIALIZE MESSAGE, USER_NUM, OFFSET_NUM ENCRYPTED
PRINT "ENTER MESSAGE"
GET MESSAGE PRINT TENER ENCRYPTION "KEY"
GET USER-NUM
DO UNTIL USER NUM == OFFSET_TABLE_INDEX
COMPARE USER__NUM WITH OFSET_TABLE INDEX
IN OFFSET_TABLE
IF USEINUM == OFFSET_TABLE_INDEX
SET OFFSET _NUM = OFFSET_TABLE_OFFSET
END
DO IT UNTIL THE MESSAGE END
GET THE CHARACTER IN THE MESSAGE
ADD OFFSET - NUM TO CHARACTER
STORE NEW CHARACTER IS ENCRYPTED
MOVE TO THE NEXT CHARACTER
END DO
PRINT ENCRYPTED
(From the algorithm can you create a table that shows the index and offset for the message that is needed to display ?)
Develop an algorithm to encrypt a message. In order to encrypt a message, the user must supply: - The message (maximum of 40 characters in length) - A number between 1 and 10 The number will be used to determine an offset from the table below as the number will be the index of the offset in the table. The value at the index in the table number will be used as an offset for all the characters in the message. For example, if the letter being encrypted is "a", the number entered was 6 , the offset at index 6 is 1 , the encrypted letter "a" would be "b". The algorithm must output the encrypted message. Using your algorithm, show what the encryption for the following message will be: problemsolvingisfunStep 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