Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import uulib.Console;
- public class SimpleCalc {
- public static int isVowel(char l) {
- if (l == 'A' || l == 'a') {
- System.out.println("True");
- } else if (l == 'E' || l == 'e') {
- System.out.println("True");
- } else if (l == 'I' || l == 'i') {
- System.out.println("True");
- } else if (l == 'O' || l == 'o') {
- System.out.println("True");
- } else if (l == 'U' || l == 'u') {
- System.out.println("True");
- } else {
- System.out.println("False");
- }
- return (l=='I' || l=='i');
- }
- public static void main(String[] args) {
- char l;
- l = Console.getChar("Enter character");
- System.out.println(+ isVowel(l)
- );
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement