View Code of Problem 43

import java.util.*;
public class Main {
	public static void main(String[] args) {
		Scanner in=new Scanner(System.in);
		String b=in.next();
		char a[]=new char[b.length()];
		for(int i=0;i<b.length();i++){
			a[i]=b.charAt(i);
			if((a[i]>='a'&&a[i]<='z')||(a[i]>='A'&&a[i]<='Z'))
				System.out.print(a[i]);
		}
		
	}
}

Double click to view unformatted code.


Back to problem 43