Question: This is my code. Can anybody help me that when I run this and the output wont have double space . Thank you so much
Settings Iools Window Help import java.util.Scanner; public class Encryption public static void main (String args) Scanner get = new Scanner (System.in); String sentence; System.out.print ("Enter a sentence to ROT13: ") sentence = get.nextLine(); System.out.println(" ORIG: "sentence) System.out.print( "ROT13:"); int numChars sentence.length); int charac = 0; int pos0; while (numChars!- pos) switch (sentence.charAt (pos)) case 'a case A" charac++ System.out.print("N"); break; case 'b': case 'B charac++ Compile Messages jGRASP Messages Run I/O Interactions jGRASP exec: java Encryption End Clear Help Enter a sentence to ROT13: meet me in the northern courtyard ORIG: meet me in the northern courtyard ROT13: ZRRGZR VAGURA BEGURE APBHEG LNEQ jGRASP: operation complete. Line:132 Col:13 Code:83
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
