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

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.

Step by Step Solution

3.27 Rating (168 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a int c int thisIsAVariable int q76354 int number b ConsoleWrite... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Visual C How Program Questions!