28 lines
652 B
Plaintext
28 lines
652 B
Plaintext
import java.util.Scanner;
|
|
public class BruttoNetto {
|
|
public static void main(String args[]) {
|
|
Scanner input = new Scanner(System.in);
|
|
|
|
int gehalt = 3000;
|
|
double steuer = 19.0;
|
|
|
|
System.out.print("Gehalt = ");
|
|
if(input.hasNextInt()) {
|
|
gehalt = input.nextInt();
|
|
}
|
|
System.out.print("Steuer = ");
|
|
if(input.hasNextDouble()) {
|
|
steuer = input.nextDouble();
|
|
}
|
|
steuer = steuer * .01;
|
|
System.out.println(steuer);
|
|
steuer = steuer + 1;
|
|
System.out.println("End Gehalt: " + (gehalt/steuer));
|
|
System.out.println("Steuer: " + ((double)gehalt * (steuer -1)));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
} |