📄 class1.cs
字号:
namespace Divider
{
using System;
/// <summary>
/// This program divides one number by another and displays the result
/// </summary>
public class DivideIt
{
public static int Main(string[] args)
{
try {
int i, j;
string temp;
Console.WriteLine ("Please enter the first integer");
temp = Console.ReadLine();
i = Int32.Parse(temp);
Console.WriteLine ("Please enter the second integer");
temp = Console.ReadLine();
j = Int32.Parse(temp);
int k = i / j;
Console.WriteLine("The result of dividing {0} by {1} is {2}", i, j, k);
} catch(Exception e) {
Console.WriteLine("An exception was thrown: {0}", e);
}
return 0;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -