-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathkdv.java
More file actions
27 lines (22 loc) · 804 Bytes
/
kdv.java
File metadata and controls
27 lines (22 loc) · 804 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
import java.util.Scanner;
public class kdv {
public static void main(String[] args) {
System.out.println("bir fiyat girin:");
double fiyat;
Scanner sc = new Scanner(System.in);
fiyat = sc.nextDouble();
double oran1 = 0.18;
double oran2 = 0.08;
if(fiyat <1000 && fiyat >0){
System.out.println("KDVsiz fiyat: "+ fiyat);
System.out.println("KDVli fiyat: "+ (fiyat*oran1+fiyat));
System.out.println("KDV tutarı: "+ fiyat*oran1);
}else{
System.out.println("KDVsiz fiyat: "+ fiyat);
System.out.println("KDVli fiyat: "+ fiyat*oran2+fiyat);
System.out.println("KDV tutarı: "+ fiyat*oran2);
}
System.exit(0);
sc.close();
}
}