APCSA/U4/L4/U4_L4_Activity_Two.java
2026-03-15 13:21:18 -07:00

24 lines
627 B
Java

/* Lesson 4 Coding Activity Question 2 */
import java.util.Scanner;
public class U4_L4_Activity_Two {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("Enter a string:");
String input = scanner.nextLine();
String lower = input.toLowerCase();
String result = "";
for (int i = 0; i < lower.length(); i++) {
char c = lower.charAt(i);
if (c != 'e' && c != 't' && c != 'a' && c != 'i' && c != 'o') {
result += c;
}
}
System.out.println(result);
}
}