I dont understand what´s wrong with my code. Some parts are in swedish, but maybe it doesnt matter anyway. The program must be able to count, in this case the year tax.
import javax.swing.*;
public class Inkomstskatt {
public static void main (String[] arg){
Toolkit.getDefaultToolkit().beep();
int knappNr = 0;
while (knappNr = 0) {
String s = JOptionPane.showInputDialog ("Ange årsinkomst")
double inkomstskatt = 0;
int x1 = Integer.parseInt(s);//x1 = inkomst//
if(x1<= 8900)
inkomstskatt = 0;
else if (x1 > 8900 && <=198700)
inkomstskatt = 100;
else if (x1 > 198700)
inkomstskatt = 100 + (x1 - 198700) * 0.20;
JOptionPane.showMessageDialog(null, "Årlig skatt:"+inkomstskatt+"Kr");
knappNr = JOptionPane.showConfirmDialog(null,
"Skall ytterliggare beräknar utföras?,
"Fråga", JOptionPane.YES_NO_OPTION);
}
System.exit(0);
}
}
