I have a problem here when I write this example in java:
if ( deadline==1){
total = A + B + C;
System.out.println(" you get =" + total);
}
if ( deadline==2 ){
total = A + B + C;
Punishment = total*(5\100);
Final = total - Punishment;
System.out.println(" you get =" + Final);
}
And when I run it,
I write on the black screen the deadline =2
but it shows on the black screen ( you get = total)
To be clear that I have values of ( A , B , C). I write it before if
statement + I ask the user before to write the number of the deadline using Scanner
.