Question: I need algorithm for this code ); import java.util.* public class Caesarcipherregaan public static void main(String args[]) { Scanner as = new Scanner (System.in); System.out.println(
I need algorithm for this code

"); import java.util.* public class Caesarcipherregaan public static void main(String args[]) { Scanner as = new Scanner (System.in); System.out.println(" Input the plaintext message String plaintext Subextline(); Sxxtenentursintani" Enter the value by which each character in the plaintext message gets shifted: "); int shift = SubextInt (); String ciphertext "" | char alphabet; for (int =0; i = 'a' && alphabet = 'z') { // shift alphabet alphabet (char) (alphabet + shift // if shift alphabet greater than 'z' if(alphabet > 'Z') { 1/ reshift to starting position alphabet = (char) (alphabet+'a'-'z'-1); } ciphertext = ciphertext + alphabet: } // if alphabet lies between 'Alans. 'z' else if (alphabet >= 'A' && alphabet 'Z') { 1/reshift to starting position alphabet = (char) (alphabet+'A'-'Z'-113 } ciphertext = ciphertext + alphabet: } else { ciphertext ciphertext + alphabet: } } System.outubrintani" ciphertext : " + ciphertext); }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
