If the value of basic =1500, what will be the value of tax after the following statement is executed?
tax=basic >1200? 200:100
Ans is 200
I need to know how did they get the answer (200) ?
Answers
Answered by
9
Answer:
as per my opinion the answer should be 100 because the value of basic is 1500 which is lesser than 1200 and as per the code you have written 200 should not be executed as the condition is not satisfied so it will move to the next value which is 100.
Answered by
9
Answer:
The required output will be 200
Tax=200
HOPE IT WILL HELPS YOU.
THANK U.
Attachments:
Similar questions