Write statements to accomplish each of the following tasks: a) Declare variables c, thisIsAVariable, q76354 and number

Question:

Write statements to accomplish each of the following tasks:

a) Declare variables c, thisIsAVariable, q76354 and number to be of type int.

b) Prompt the user to enter an integer.

c) Input an integer and assign the result to int variable value.

d) If the variable number is not equal to 7, display "The variable number is not equal to 7".

e) Display "This is a C# app" on one line in the console window.

f) Display "This is a C# app" on two lines in the console window. The first line should end with C#. Use method Console.WriteLine.

g) Write a statement that uses string interpolation to display the sum of the variables x and y. Assume variables x and y of type int exist and already have values.

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: