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

pls answer guys if you do you get something good
A triangle has side lengths of (2t+2) centimeters,(6t-7) centimeters,and (u-2) centimeters.Which expression represents the perimeter,in centimeters,of the trian
when was george washington born
Please help with my spanish
find the unknown angles. QRT and SRV are congruent
"Know the advantages each side had. List them here." (revolutionary war)
Does anyone know what 2+2 is?
1. Group of organs that work together to do a specific job for an organism, such as the digestive system.​
The game hides the amount of cookies-per-second a new "vendor" (the grandmothers, the cookie farm, the mines, etc.) will grant you until you have purchased your
pls help! SOS PLS HELP this question is very very hard and i wanna play roblo.x when im done so pls help btw pls tell me ur users