#Need help with this question
1 messages · Page 1 of 1 (latest)
While you are waiting for getting help, here are some tips to improve your experience:
If nobody is calling back, that usually means that your question was not well asked and hence nobody feels confident enough answering. Try to use your time to elaborate, provide details, context, more code, examples and maybe some screenshots. With enough info, someone knows the answer for sure.
Don't forget to close your thread using the command </help-thread close:1027500463647621170> when your question has been answered, thanks.
Detected code, here are some useful tools:
Formatted code
import java.util.Scanner;
public class DecisionStatementsExercisesBQuestion3 {
static Scanner input = new Scanner(System.in);
public static void main(String[] args) {
double dozensEggs, eggs, extraEggs, bill;
System.out.println("Enter the number of eggs purchased:");
dozensEggs = input.nextDouble();
if (dozensEggs < 4) {
bill = dozensEggs * 0.50;
System.out.println("The bill is equal to:" + bill);
}
}
}
Best hint I can give at this point: What are the units of the problem?
(We're not dealing with dozens)