here is the code
import java.util.Scanner;

public class Cipher {

public static void main (String args[]) {


int key = 0;
String sentence;