KnowledgeBoat Logo
|

Robotics & Artificial Intelligence

Evaluate the following expressions:

Given: a=5; b=4

  1. 12*(a+b)-10
  2. 12*a+b-10
  3. 12+a*b-10
  4. 12-10+a*b

Getting Started

1 Like

Answer

  1. 12*(a+b)-10
    = 12*(5+4)-10
    = 12*9-10
    = 108-10
    = 98

  2. 12*a+b-10
    = 12*5+4-10
    = 60+4-10
    = 64-10
    = 54

  3. 12+a*b-10
    = 12+5*4-10
    = 12+20-10
    = 32-10
    = 22

  4. 12-10+a*b
    = 12-10+5*4
    = 12-10+20
    = 2+20
    = 22

Answered By

2 Likes


Related Questions