if a=10 and b=20, then what will be the value in variable a and b? give reason to support your answers :
a-=b;
a/=b;
a*=b;
a+=b;
Answers
Answered by
30
Answer:
- (a,b) = -10, 20
- (a,b) = 0.5, 20
- (a,b) = 200, 20
- (a,b) = 30, 20
Explanation:
For the option a:
The option can be expanded into
a-=b = (a = a – b); a = 10; b = 20
Therefore, the real value of a = -10 and b = 20
For the option b:
The option can be expanded into
a/=b = (a = a / b); a = 10; b = 20
Therefore, the real value of a = 0.5 and b = 20
For the option c:
The option can be expanded into
a*=b = (a = a* b); a = 10; b = 20
Therefore, the real value of a = 200 and b = 20
For the option d:
The option can be expanded into
a+=b = (a = a+ b); a = 10; b = 20
Therefore, the real value of a = 30 and b = 20
Answered by
2
Answer:
(a,b) = -10, 20
(a,b) = 0.5, 20
(a,b) = 200, 20
(a,b) = 30, 20
Explanation:
Similar questions