Question
Need help with C# (Variables, String, Etc). Assign them appropriately, I am using Visual Studio for the console The following tasks need to be carried
Need help with C# (Variables, String, Etc). Assign them appropriately, I am using Visual Studio for the console
The following tasks need to be carried out:
Personalize your code by adding statements that print your name, course, and assignment title to the console.
Analyze the options for the data types and their implication on the accuracy of the performed operations within the project. Explain, justify, and document the selections you made. Declare and, where appropriate, initialize the constants and variables. Display the questions and answers on the console. Read user input pertaining to the question from the console. Display the user input on the console.
For this assignment, you will submit the .cs file that contains all of the code from this assignment. Include your name in the top of the script using the following format. CH2DoeJohn.cs
_ Here is the Quiz that is being written in visual studio (only questions 1 & 2 of 10 total are displayed) =
Question 1: Is Carbon/ Graphite Fiber lighter than Aluminum or steel?
Answer 1. = Yes . CORRECT
Answer 2.= No
Question 2: The F/A-EF Super Hornet max speed is?
Answer 1. = 890 MPH
Answer 2. = Mach 1.7 . CORRECT
Answer 3. = Mach 2.9
Answer 4. = 967.3 MPH
NOTES= . Strings Example
:Consider an example in which we declare several variables of type string, initialize them and print their values on the console: // Declare some variables string firstName = "John"; string lastName = "Smith"; string fullName = firstName + " " + lastName; // Print the results on the console Console.WriteLine("Hello, " + firstName + "!"); Console.WriteLine("Your full name is " + fullName + "."); // Console output: // Hello, John! // Your full name is John Smith. 122 Fundamentals of Computer Programming with C# Object Type Object type is a special type, which is the parent of all other types in the .NET Framework. Declared with the keyword object, it can take values from any other type. It is a reference type, i.e. an index (address) of a memory area which stores the actual value.
Using Objects Example:
Consider an example in which we declare several variables of type object, initialize them and print their values on the console: // Declare some variables object container1 = 5; object container2 = "Five"; // Print the results on the console Console.WriteLine("The value of container1 is: " + container1); Console.WriteLine("The value of container2 is: " + container2); // Console output: // The value of container1 is: 5 // The value of container2 is: Five. As you can see from the example, we can store the value of any other type in an object type variable.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started