content: import java.util.*;
  public class Main{
      public static void main(String[] args) {
          Scanner sc = new Scanner(System.in);
          System.out.print("Enter your PlainText : ");
          String str = sc.nextLine();
          System.out.print("Enter the key : ");
          int key = sc.nextInt();
          String ans = "";
          for(char u:str.toCharArray()){
              int ascii = (int)u;
              if(ascii>=65 && ascii<=90){
                  ascii += key;
                  if(ascii>=90){
                      ascii = ascii%90;
                      ascii = 64 + ascii;
                  }
                  ans += (char)ascii;
              }
              else if(ascii>=97 && ascii<=122){
                  ascii += key;
                  if(ascii>=122){
                      ascii = ascii%122;
                      ascii = 96 + ascii;
                  }
                  ans += (char)ascii;
              }
              else if(ascii>=48 && ascii<=57){
                  System.out.println(ascii);
                  ascii += key;
                  System.out.println(ascii);
                  if(ascii>=57) 
                  {
                      ascii = 47 + ascii;
                      ascii = ascii%57;
                  }
                  ans += (char)ascii;
              }
              else{
                  ans += u;
              }
          }
          System.out.println("Encrypted string : "+ans);
      }
  }
  