-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUcSayiEnBuyuk.java
More file actions
34 lines (29 loc) · 918 Bytes
/
UcSayiEnBuyuk.java
File metadata and controls
34 lines (29 loc) · 918 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
package com.company;
import java.util.Scanner;
public class UcSayiEnBuyuk {
public static void main(String args[]){
Scanner scanner = new Scanner(System.in);
System.out.print("Birinci Sayıyı Giriniz: ");
int sayi1 = scanner.nextInt();
System.out.print("İkinci Sayıyı Giriniz: ");
int sayi2 = scanner.nextInt();
System.out.print("Üçüncü Sayıyı Giriniz: ");
int sayi3 = scanner.nextInt();
int enbuyuk = sayi1;
int enkucuk = sayi1;
if(sayi2 > enbuyuk){
enbuyuk = sayi2;
}
if(sayi2 < enkucuk){
enkucuk = sayi2;
}
if(sayi3 > enbuyuk){
enbuyuk = sayi3;
}
if(sayi3 < enkucuk){
enkucuk = sayi3;
}
System.out.println("En Büyük Sayı: "+enbuyuk);
System.out.println("En Küçük Sayı: "+enkucuk);
}
}