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; steuer = steuer + 1; System.out.println("End Gehalt: " + (gehalt/steuer)); System.out.println("Steuer: " + ((double)gehalt * (steuer -1))); } }