Respuesta :
Solution :
class MainClass {
public static void Main(string[] args){
// Declaring variables here
// Change the name , course name and assignment name
String name = "Your name here"; //Stores name of the student
String courseName = "Course Name here"; //Stores course name
String assignmentName = "Assignment name here";//Stores assignment name
int answer; //Stores answer
// Dispaying the name , course and assignment name
Console.WriteLine("Name: "+ name);
Console.WriteLine("Course Name: "+ courseName);
Console.WriteLine("Assignment Name: "+ assignmentName);
// Displaying Question 1
Console.WriteLine("\nQuestion 1: Is the Carbon or Graphite Fiber is lighter than that of Aluminum or the steel?");
// Displaying options
Console.WriteLine("Answer [tex]$.1=$[/tex]Yes\nAnswer 2.= No");
// Prompting user to choose the correct answer
Console.WriteLine("Choose the correct answer");
// Taking input from the user and cnverting into int
answer = Convert.ToInt32(Console.ReadLine());
// Checking for the correct or wrong answer
String correct_or_wrong = 1 == answer ? "Correct": "Wrong";
// Displaying the result
Console.WriteLine(correct_or_wrong);
// Displaying Question 1
Console.WriteLine("\nQuestion 2: The [tex]$F/A-EF$[/tex] Super Hornet max speed is?");
// Displaying options
Console.WriteLine("Answer 1. = 890 MPH\nAnswer 2. = Mach 1.7\nAnswer 3. = Mach 2.9\nAnswer 4. = 967.3 MPH");
// Prompting user to choose the correct answer
Console.WriteLine("Choose the correct answer");
// Taking input from the user and cnverting into int
answer = Convert.ToInt32(Console.ReadLine());
// Checking for the correct or wrong answer
correct_or_wrong = 2 == answer ? "Correct": "Wrong";
// Displaying the result
Console.WriteLine(correct_or_wrong);
}
}