MSalmanHussain
MSalmanHussain MSalmanHussain
  • 25-12-2016
  • Computers and Technology
contestada

How do you Evaluate an equation doing dry run ? In C++ language whats the order for using the operators like +, -, /, * ? For Example (2-5+10*3/4)

Respuesta :

TheBlueLight
TheBlueLight TheBlueLight
  • 25-12-2016
just as math in, -3+30/4 the variable u use tells the recision
for int it would be
5 wich is wrong (4.5 is the answer)
so u include iostream
create main function , declare the variables and write the equation
Answer Link
rsmith6559
rsmith6559 rsmith6559
  • 26-12-2016
In most program languages, operator precedence is algebraic. Exponents, multiplication/division, addition/subtraction and I believe all the comparison operations are lowest. The search term would be "operator precedence".

Operators of equal precedence are evaluated left to right.
Answer Link

Otras preguntas

William is putting up signs on the edge of the road every 1/16 of a mile. He just put a sign down and he has 7/8 of a mile of road left in which to place his si
Selena has $10. What is the greatest amount of spinach she can buy? Spinach is $3 per pound. How many pounds at mostc
Mark the statement if it correctly describes Russia's ports. A. During the early part of Peter's reign, Archangel was Russia's only major port. B. Peter beli
how do I find out how to decompose 3/10
make x the subject v²+x=w
Which are the following assort independently ?
what is x? 4(x+2)=4(x+2)
what does 14 divided by 413 equal
Which statement best compares the density among the three states of matter? Solids have the least density among the three, gases have the highest, and liquids a
what is x+2=17-4x for a multiple step equation