Computer Science, asked by jinashjaved36, 9 months ago

evaluate the value of n if value of p=4 and q=9​

Answers

Answered by jkker142
2

Answer:

Syntax

condition ? value_if_true : value_if_false

p=4 , q=9

int n=(q-p) >(p-q)? (q-p) :(p-q)

q-p=9-4= 5

p-q=4-9= -5

so ur condition statement becomes

n = 5 > - 5 ? 5 : -5

So value of n= 5

Similar questions