View Code of Problem 43

import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
         Scanner scan=new Scanner(System.in);
         String str=scan.nextLine();
          String str1="";
          for(int i=0;i<str.length();i++){
          	char t=str.charAt(i);
            if(t>='A'&&t<='z'){
            	str1=str1+t;
            }
          }
          
          System.out.println(str1);
         
	}
}

Double click to view unformatted code.


Back to problem 43