subject

// DebugFive1 // Adds your lunch bill
// Burger and hot dog are $2.59
// Grilled cheese and fish are $1.99
// Fries are 89 cents
import java. util.*;
public class DebugFive1
{
public static void main(String args[])
{
Scanner input = new Scanner(System. in);
final double HIGH_PRICE = 2.59;
final double MED_PRICE = 1.99;
final double LOW_PRICE = 0.89;
String usersChoiceString;
int usersChoice;
double bill;
System. out. println("Order please\n1 - Burger\n2 - Hotdog" +
"\n3 - Grilled cheese\n4 - Fish sandwich");
usersChoiceString = input. next();
usersChoice == Integer. parseInt(usersChoiceString);
if(usersChoice == 1 && usersChoice == 2)
bill = bill + HIGH_PRICE;
else
bill = bill + MED_PRICE;
System. out. println("Fries with that?\n1 - Yes\n2 - No";
usersChoiceString = input. next()
usersChoice = Integer. parseInt(usersChoiceString);
if (usersChoice = 1)
bill = bill + LOW_PRICE;
System. out. println("Bill is " + bill);
}
}

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 21:50, dijaflame67
Answer the following questions regarding your system by using the commands listed in this chapter. for each question, write the command you used to obtain the answer. a. what are the total number of inodes in the root filesystem? how many are currently utilized? how many are available for use? b. what filesystems are currently mounted on your system? c. what filesystems are available to be mounted on your system? d. what filesystems will be automatically mounted at boot time?
Answers: 1
image
Computers and Technology, 23.06.2019 05:00, bellad0124outlookcom
In cell b18, enter a formula to calculate the amount budgeted for meals. this amount is based on the daily meal allowance and the total travel days (# of nights+1).
Answers: 1
image
Computers and Technology, 24.06.2019 11:00, asiaosterling
The program below has been generalized to read a user's input value for hourlywage. run the program. notice the user's input value of 10 is used. modify that input value, and run again. generalize the program to get user input values for workhoursperweek and workweeksperyear (change those variables' initializations to 0). run the program. monthsperyear will never change, so define that variable as final. use the standard for naming final variables. ex: final int max_length
Answers: 2
image
Computers and Technology, 24.06.2019 14:00, youcandoit13
In simple terms, how would you define a protocol?
Answers: 2
You know the right answer?
// DebugFive1 // Adds your lunch bill
// Burger and hot dog are $2.59
// Grilled cheese...

Questions in other subjects:

Konu
Mathematics, 28.07.2019 04:33