Answer to Question #8808 in C++ for HATEM117
Question #8808
Write a test program in your favorite language that determines and output the precedence and associativity of its arithmatic and Boolean operators.
Expert's answer
in javascript:
var a = 5,
b = 10,
c = true,
d = false;
b+=a; alert('b+a='+b);
b-=2*a; alert('b-a='+b);
b=(b+a)/a; alert('b/a='+b);
b*=a*a; alert('b*a='+b);
с&=d; alert('c&d='+c);
с|=d; alert('c|d='+c);
с^=d; alert('c^d='+c);
var a = 5,
b = 10,
c = true,
d = false;
b+=a; alert('b+a='+b);
b-=2*a; alert('b-a='+b);
b=(b+a)/a; alert('b/a='+b);
b*=a*a; alert('b*a='+b);
с&=d; alert('c&d='+c);
с|=d; alert('c|d='+c);
с^=d; alert('c^d='+c);
Need a fast expert's response?
Submit orderand get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
You're welcome. We are glad to be helpful.
If you really liked our service please press like-button beside answer field. Thank you!
thanks very much that's awesome
Leave a comment