Computer Science, asked by keerthanag2222, 9 months ago

Integer a, b, c, d
set a=14, b =15, C=16
if(a>6)
b=C-a
if(a>c)
d =d+c
else
d=b-c
else
d=a+b+c-3
Print d​

Answers

Answered by khushikorah
4

Answer:

sorry bro I don't know about this

Explanation:

but mark me brainlist and follow me

Answered by vinod04jangid
0

Answer:

-14

Explanation:

int a=14, b =15, c=16

if(a > 6){

  b = c - a

  if(a > c){

      d = d + c

  }else{

      d = b - c

  }

}else{

  d = a + b + c - 3

}

Print d​

⇒ In the 1st conditional statement we are checking if a is greater than 6. As we know 14 > 6, so it enters the if block and b = 16 - 14 that is equal to 2. Then inside it we have nested if-else where under if condition we check if 14 > 16 which return false, so it enters the else block and d becomes 2 - 16 that is equal to -14.

Hence the output is -14.

#SPJ3

Similar questions