Write the following code using c #, In a write a method called DisplayMenu() to display the following text on screen: ===========Narendra’s Computer Systems================ | 1. Display Personal Information | | 2. Calculate Tuition | | 3. Calculate Area Of A Circle| | 4. Calculate The Area Of A Triangle| | 5. Calculate Sales Commission | | 6. Display Sine Table | | 0. End program| | | ====================================================== Enter the number of your choice -> You may replace the instructor’s name with your name.
时间: 2023-06-30 19:13:28 浏览: 53
Sure! Here's the C# code:
```
using System;
public class Program
{
public static void Main()
{
DisplayMenu();
}
public static void DisplayMenu()
{
Console.WriteLine("===========Your Name's Computer Systems================");
Console.WriteLine("| 1. Display Personal Information |");
Console.WriteLine("| 2. Calculate Tuition |");
Console.WriteLine("| 3. Calculate Area Of A Circle |");
Console.WriteLine("| 4. Calculate The Area Of A Triangle |");
Console.WriteLine("| 5. Calculate Sales Commission |");
Console.WriteLine("| 6. Display Sine Table |");
Console.WriteLine("| 0. End program |");
Console.WriteLine("| |");
Console.WriteLine("======================================================");
Console.WriteLine("Enter the number of your choice -> ");
}
}
```
Note that you can replace "Your Name" with your actual name. This code will display the menu on the console.