Ask a Teacher



What output will be the following code fragment produce? int val, res, n=1000; cin>>val; res = (n+val) >1750 ? 400 : 200; cout<

i) If the input is 2000; the output will be 400.

ii) If the input is 500; the output will be 200.


comments powered by Disqus