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
a int c int thisIsAVariable int q76354 int number b ConsoleWrite... View full answer
Get step-by-step solutions from verified subject matter experts
