View Code of Problem 43

import java.util.Scanner;

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

Double click to view unformatted code.


Back to problem 43