evaluate the value of n if value of p=4 and q=9
Answers
Answered by
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
Physics,
4 months ago
Psychology,
4 months ago
English,
9 months ago
Computer Science,
9 months ago
English,
1 year ago