Computer Science, asked by hasanansari, 1 year ago

(1). what will be the output when: (a) val 500 (b) val = 1500 int val,sum,n=550; sum=n+val>1750? 400:200; system.out.print(sum);

Answers

Answered by ananya071
103
Hi,
a)val=500
Execution:
sum=(500+550)>1750?400:200
sum=1050>1750?400:200;
Output:
200
b)val=1500
Execution:
sum=(1500+550)>1750?400:200
sum=2050>1750?400:200;
Output:
400

#hope it helps.

ananya071: welo
hasanansari: your intro plz
ananya071: why
Similar questions