Question: Please use Java Q3. Write a program to encrypt an English text using the following mechanism. First, remove all the spaces from the text, then

Please use Java
 Please use Java Q3. Write a program to encrypt an English

Q3. Write a program to encrypt an English text using the following mechanism. First, remove all the spaces from the text, then let L be the length of this text. Now, write the characters of the text into a grid of rows and columns with following constraints. where La] is floor function and-r) is ceil function Ensure that rows columns >-L and a grid with minimum area. If multiple grids satisfy the above conditions, choose the one with the minimum area, i.e.. The encrypted message is obtained by displaying the characters as per the columns and insert a space after each column. Sample input: Have a nice day Note:Here, L-12, V12 is between 3 and 4 Sample output: Hae and via ecy Encode the message using above scheme and print the encoded message

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!