Question: Write C# statements to accomplish each of the following tasks: a) Assign the sum of x and y to z, and increment x by 1
Write C# statements to accomplish each of the following tasks:
a) Assign the sum of x and y to z, and increment x by 1 with ++. Use only one statement and ensure that the original value of x is used in the statement.
b) Test whether variable count is greater than 10. If it is, display "Count is greater than 10".
c) Decrement the variable x by 1, then subtract it from the variable total. Use only one statement.
d) Calculate the remainder after q is divided by divisor, and assign the result to q. Write this statement in two different ways.
Step by Step Solution
3.47 Rating (160 Votes )
There are 3 Steps involved in it
a z x y b If count 10 ... View full answer
Get step-by-step solutions from verified subject matter experts
