WoahItsKiller WoahItsKiller
  • 26-11-2020
  • Computers and Technology
contestada

How do I fix my mistake in the code, do not give me a bs answer like “I don’t know sorry” if you do not know just move on because I will report it like I have before.

How do I fix my mistake in the code do not give me a bs answer like I dont know sorry if you do not know just move on because I will report it like I have befor class=

Respuesta :

Cytokine
Cytokine Cytokine
  • 26-11-2020

The problem lies within your if statement. You're using a single equals sign when you should be using two.

if (operation == 1)

Two equal signs is a comparison operator. It checks to see if one value equals another value. In your case, its checking if operation equals 1. But, this only solves half the problem. Operation is a string and you need to compare it to a string.

if (operation == "1")

I hope this helps!

Answer Link

Otras preguntas

What is the value, after 7 years, of a 2014 Ford Mustang that originally costs $25,000.00
HELP ASAP PLEASE! Read the two passages and answer the question. Passage 1: "Midas" retold by Thomas Bulfinch [1] Bacchus, on a certain occasion, found his old
jasmin $15 per week for completing chores . She spends $12 on a video game. What percent of her monthly allowance did jasmin spend on her video game f
Which experiences or strengths did LBJ bring to the presidency? Choose all answers that are correct. LBJ was energetic and hard working. LBJ's business contacts
State the Pythagorean Theorem and tell how you can use it to solve problems.
how do i do this? please answer asap!!!
Can I please get help
According to the image below, which season is about to begin in the southern hemisphere? Summer Autumn Winter Spring
was lord Capulet a good father?
for some reason even though im in 8th grade and take a bunch of high school classes i suck at this.