Computer Science, asked by preranapi67gmailcom, 7 months ago

Q.4.Predict the output of the following:: *

a=2.0
b=3.4
C=4.8
printf((a-b)<(b-c))==((a-b)>(b-c)))

1

O

False

True​

Answers

Answered by anindyaadhikari13
1

\star\:\:\:\sf\large\underline\blue{Question:-}

Predict the output of the following statement.

\star\:\:\:\sf\large\underline\blue{Steps:-}

Given,

a=2.0

b=3.4

c=4.8

Condition given,

(((a-b)<(b-c))==((a-b)>(b-c)))

Now,

a-b= -1.4

And,

b-c = -1.4

Therefore,

(a-b) <(b-c) is false as well as (a-b) >(b-c) is also false

So,

false == false is true

Therefore

output is :

true.

\star\:\:\:\sf\large\underline\blue{Output:-}

true

Similar questions