-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLogical_Operator.java
More file actions
37 lines (37 loc) · 1.09 KB
/
Logical_Operator.java
File metadata and controls
37 lines (37 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package my_frist_java;
/**
* @author ARIFUL ISLAM
*/
import java.util.Scanner;
public class Logical_Operator {
/*public static void main(String[] args) {
Scanner input = new Scanner(System.in);
char ch;
System.out.print("Enter any letter : ");
ch = input.next().charAt(0);
if(ch=='a' || ch=='e' || ch=='i' || ch=='o' || ch=='u' ||
ch=='A' || ch=='E' || ch=='I' || ch=='O' || ch=='U')
{
System.out.println("Vowel");
}
else
{
System.out.println("Consonant");
}
}*/
public static void main(String[] args) {
Scanner input= new Scanner(System.in);
char ch;
System.out.print("Enter any letter : ");
ch = input.next().charAt(0);
if(ch=='a' || ch=='e' || ch=='i' || ch=='o' || ch=='u' ||
ch=='A' || ch=='E' || ch=='I' || ch=='O' || ch=='U' )
{
System.out.println("Vowel");
}
else
{
System.out.println("Consonant");
}
}
}