98.9k views
2 votes
A*=++a/6+b++ 3 if a=3,b=4​

User Belma
by
3.8k points

1 Answer

5 votes

Answer:


a=22.5

Step-by-step explanation:

Given


a*=++a/6+b++3

Required

The result when
a=3 and
b=4

Analyzing the given instruction

a*=(++a)/(6)+(b++3)

Single out and solve the expressions in bracket

(++a) = a -- When the ++ operator appears before an operand, it is called pre increment. meaning that the operation will be done before the operand will be incremented.

So: in this case: ++a = a


b++3 = b + 3

The operator, as used in that statement is the same as: b + 3.

So:


a*=(++a)/(6)+(b++3)


a*=(a)/(6)+(b+3)


a*=(3)/(6)+(4+3)


a*=0.5+7


a*=7.5

The above expression is calculated as:


a=a*7.5

So:


a=3*7.5


a=22.5

User Tomas Bulva
by
4.1k points