Advertisement
Guest User

Untitled

a guest
Nov 18th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1.  
  2. import uulib.Console;
  3.  
  4. public class SimpleCalc {
  5.  
  6. public static int isVowel(char l) {
  7. if (l == 'A' || l == 'a') {
  8. System.out.println("True");
  9. } else if (l == 'E' || l == 'e') {
  10. System.out.println("True");
  11. } else if (l == 'I' || l == 'i') {
  12. System.out.println("True");
  13. } else if (l == 'O' || l == 'o') {
  14. System.out.println("True");
  15. } else if (l == 'U' || l == 'u') {
  16. System.out.println("True");
  17. } else {
  18. System.out.println("False");
  19. }
  20. return (l=='I' || l=='i');
  21. }
  22.  
  23.  
  24.  
  25.  
  26.  
  27. public static void main(String[] args) {
  28. char l;
  29. l = Console.getChar("Enter character");
  30. System.out.println(+ isVowel(l)
  31. );
  32. }
  33.  
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement