1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
enot [183]
4 years ago
13

// DebugFive1

Computers and Technology
1 answer:
RUDIKE [14]4 years ago
8 0

Answer:

See Explanation

Explanation:

The lines with incorrect syntax and corrections are:

1.

Line:

usersChoice == Integer.parseInt(usersChoiceString);

Error

The error is that a relational operator (==) is used instead of an assignment operator (=)

Correction

usersChoice = Integer.parseInt(usersChoiceString);

2.

Line:

System.out.println("Fries with that?\n1 - Yes\n2 - No";

Error:

The line requires a corresponding close bracket

Correction

System.out.println("Fries with that?\n1 - Yes\n2 - No");

3.

Line:

usersChoiceString = input.next()

Error:

The line is not terminated

Correction:

usersChoiceString = input.next() ;

4.

Line

if (usersChoice = 1)

Error

A relational operator is needed

Correction:

if (usersChoice == 1)

Lastly, you need to initialize bill to a value or prompt user for input.

I've added the full source code as an attachment

Download java
You might be interested in
Write a program in C++ to Find the Average of the sum of prime numbers between 1 to any given number
mixas84 [53]

Using the knowledge in computational language in C++ it is possible to write a code that Find the Average of the sum of prime numbers between 1 to any given number

<h3>Writting in C++ code:</h3>

<em />

<em>#include <iostream></em>

<em>using namespace std;</em>

<em>bool isPrime(int n){</em>

<em>   for(int i = 2; i < n/2; i++){</em>

<em>      if(n%i == 0){</em>

<em>         return false;</em>

<em>      }</em>

<em>   }</em>

<em>   return true;</em>

<em>}</em>

<em>int findPrimeSum(int n){</em>

<em>   int sumVal = 0;</em>

<em>   for(float i = 2; i <= n; i++){</em>

<em>      if(isPrime(i))</em>

<em>         sumVal += i;</em>

<em>   }</em>

<em>   return sumVal;</em>

<em>}</em>

<em>int main(){</em>

<em>   int n = 15;</em>

<em>   cout<<"The sum of prime number between 1 to "<<n<<" is "<<findPrimeSum(n);</em>

<em>   return 0;</em>

<em>}</em>

See more about C++ code at brainly.com/question/19705654

#SPJ1

8 0
1 year ago
1. My grandma and I went shopping to look for old
docker41 [41]

Answer:

uncommon

Explanation:

it's not common or usual because no one else finds the things

it's not kind because inanimate objects don't show feelings

6 0
3 years ago
PLEASE HELP
vitfil [10]

Answer:

1. I would ask her how big is her house, because when it’s big fiber optic cable is the best choice.

2. I would also ask her how loud is her house, as STP cable would be best choice.

Explanation:

Fiber optic cables have larger bandwidth than conventional metal cables. The amount of information transmitted per unit time using fiber over other transmission media is higher when compared to other alternatives. Power loss is minimal as this aid transmission over a long distance, this is why it is the best for big houses.

STP cables, are known for their better efficiency. But are expensive and hard to install, way stiffer and needs a lot of space.

5 0
3 years ago
Given a constant named size with a value of 5, which statement can you use to define and initialize an array of doubles named ga
Vinil7 [7]

Answer:

all of the above

7 0
3 years ago
The Electronic Age began in the<br> A. 1940s<br> B. 1970s<br> C. 1980s<br> D. 1990s
sergejj [24]

Answer:

1940

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • What does the "e" in eSATA stand for?
    13·2 answers
  • Adam is so good at playing arcade games that he will win at every game he plays. One fine day as he was walking on the street, h
    13·1 answer
  • What are use class diagram, use case description and activity diagrams for use cases?
    7·1 answer
  • Write a class called Line that represents a line segment between two Points. Your Line objects should have the following methods
    8·1 answer
  • A network that typically reaches a few meters, such as up to 10 meters (33 feet), and consists of personal devices such as mobil
    14·1 answer
  • Which of the following is true of e-learning and computer-based training (CBT)?
    13·1 answer
  • Suppose that a NAT is between the Internet and a company's network. Now suppose that the NAT crashes, but quickly restarts, in a
    7·1 answer
  • Question:
    14·1 answer
  • Which three statements are true of lossless compression?
    6·1 answer
  • You want to purchase a computer, and the salesperson refers to separate pricing for a system unit and for the software applicati
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!