Write C# statements to accomplish each of the following tasks: a) Assign the sum of x and

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 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.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Visual C# How to Program

ISBN: 978-0134601540

6th edition

Authors: Paul J. Deitel, Harvey Deitel

Question Posted: