Professional Documents
Culture Documents
*;
import java.util.Scanner;
int start=0;
String s="";
for(int i=0;i<message.length();i++) {
if(message.charAt(i)==' ') {
s=s+message.substring(start,i);
start=i+1;
}
}
s=s+message.substring(start);
if (!((msgchar % 4) == 0)) {
do {
s = s + " ";
msgchar = s.length();
} while (!((msgchar % 4) == 0));
}
String ans = "";
System.out.println();
for (int j = 0; j < x; j++) {
for (int i = 0; i < 4; i++) {
System.out.print(temp[j][i]+" ");
ans+=temp[i][j];
}
System.out.println();
}
System.out.println("----- result of encryption -----\n");
System.out.println(ans);
System.exit(0);
}