Explore BrainMass
Share

x value

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

What is the value of x after each of the following statements are encountered in a computer program, if x = 1 before the statement is reached. Explain fully.

(a) if 2 + 2 = 5 AND 3 + 4 = 7 then x:= x + 1
(b) if 2 + 3 = 5 XOR 3 + 4 = 8 then x:= x + 1

© BrainMass Inc. brainmass.com October 25, 2018, 5:34 am ad1c9bdddf
https://brainmass.com/math/discrete-math/x-value-424986

Solution Preview

What is the value of x after each of the following statements are encountered in a computer program, if x = 1 before the statement is reached. ...

Solution Summary

This solution displays the value of x after each of the following statements are encountered in a computer program, if x = 1 before the statement is reached.

$2.19
See Also This Related BrainMass Solution

Uniform Distributions

1) Suppose that A, B, C are independent random variables, each being uniformly distributed over (0,1). What is the joint cumulative distribution function of A, B, C? What is the probability that all of the roots of the equation Ax^2+Bx+C=0 are real?

2) If X is uniformly distributed over (0,1) and Y is exponentially distributed with parameter 1, find the distribution of (a) Z=X+Y and (b) Z=X/Y. Assume independence.

View Full Posting Details