Westonci.ca is the ultimate Q&A platform, offering detailed and reliable answers from a knowledgeable community. Join our Q&A platform and connect with professionals ready to provide precise answers to your questions in various areas. Get quick and reliable solutions to your questions from a community of experienced experts on our platform.
Sagot :
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);
}
}
Thank you for your visit. We're dedicated to helping you find the information you need, whenever you need it. We hope you found this helpful. Feel free to come back anytime for more accurate answers and updated information. Westonci.ca is committed to providing accurate answers. Come back soon for more trustworthy information.