forked from bayramcicek/comu2017java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
J3inputType.java
48 lines (37 loc) · 1.2 KB
/
J3inputType.java
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
package PackageJavaNesne;
/**
* Created by cicek on 2.10.2017 01:35
*/
import java.util.Scanner;
public class J3inputType {
public static void main(String[] args){
int a1,a2;
Scanner Nesne1 = new Scanner(System.in);
System.out.print("ilk sayını gir = ");
a1 = Nesne1.nextInt();
System.out.print("ikinci sayını gir = ");
a2 = Nesne1.nextInt();
/*
Read a byte - nextByte()
Read a short - nextShort()
Read an int - nextInt()
Read a long - nextLong()
Read a float - nextFloat()
Read a double - nextDouble()
Read a boolean - nextBoolean()
Read a complete line - nextLine()
Read a word - next()
*/
System.out.println("\nYour 1.numaran = " + a1);
System.out.println("Your 2.numaran = " + a2);
if (a1>a2){
System.out.println("\na1 büyüktür a2");
}
else if (a1<a2){
System.out.println("\na2 büyüktür a1");
}
else {
System.out.println("\na1 eşittir a2");
}
}
}