Skip to content

Instantly share code, notes, and snippets.

@smyy96
Last active January 20, 2022 21:28
Show Gist options
  • Save smyy96/0eb2e32807a21c97261e9191aaeef3ba to your computer and use it in GitHub Desktop.
Save smyy96/0eb2e32807a21c97261e9191aaeef3ba to your computer and use it in GitHub Desktop.
Patika Java101 dersi KDV Hesaplama - Patika Java 101 lesson VAT Calculation
import java.util.Scanner;
public class KDV {
public static void main(String[] args) {
//KDV Hesaplama - KDV Calculation
Scanner input= new Scanner(System.in);
double total=0, kdv=0;
System.out.println("Enter the fee amount:");
total=input.nextDouble();
kdv=total;
if (total<=1000 && total>0)
{
kdv += (total*0.18);
System.out.println("Price: "+total+" KDV %18: "+kdv);
}
else{
kdv += (total*0.8);
System.out.println("Price: "+total+" KDV %8: "+kdv);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment