lecture3.java
943 Bytes
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import java.util.Scanner;
public class lecture3{
public static void main(String args[]){
/*
int num;
System.out.print("Enter Number : ");
Scanner input = new Scanner(System.in);
num = input.nextInt();
if(num%5 == 0)
System.out.println("HiFive");
else if(num%2 == 0)
System.out.println("HiEven");
else
System.out.println("HiOdd");
*/
/*
float bmi;
System.out.print("Enter Weight : ");
Scanner input = new Scanner(System.in);
bmi = input.nextFloat();
if(bmi<18.5){
System.out.println("Underweight");
}
else if(bmi<25){
System.out.println("Normal");
}
else if(bmi<30){
System.out.println("Overweight");
}
else{
System.out.println("Obese");
}
*/
int x = 1;
System.out.println((x > 1) & (x++ < 10));
System.out.println((1 > x) && ( 1 > x++));
System.out.println((1 == x) | (10 > x++));
System.out.println((1 == x) || (10 > x++));
}
}