-
Notifications
You must be signed in to change notification settings - Fork 0
/
KdvHesap.java
39 lines (24 loc) · 858 Bytes
/
KdvHesap.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
import java.util.Scanner;
public class KdvHesap {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int girilenTutar;
System.out.println("Tutar Giriniz :");
girilenTutar = input.nextInt();
if (girilenTutar > 0 && girilenTutar <= 1000) {
float kdvOrani = 0.18f;
float kdvliTutar = girilenTutar + girilenTutar * kdvOrani;
System.out.println("Kdv'siz Fiyat :" + girilenTutar);
System.out.println("Kdv Tutari :" + (girilenTutar * kdvOrani));
System.out.println("Kdv'li Tutar :" + kdvliTutar);
}
else
{
float kdvOrani = 0.08f;
float kdvliTutar = girilenTutar + girilenTutar * kdvOrani;
System.out.println("Kdv'siz Fiyat :" + girilenTutar);
System.out.println("Kdv Tutari :" + (girilenTutar * kdvOrani));
System.out.println("Kdv'li Tutar :" + kdvliTutar);
}
}
}