using System;
namespace LearnCS
{
class Program
{
static void Calc(double x, double y) {
Console.WriteLine("Add: " + (x + y));
Console.WriteLine("Sub: " + (x - y));
Console.WriteLine("Mul: " + (x * y));
Console.WriteLine("Div: " + (x / y));
}
static void Person(string x, string y) {
string result = x + " " + y;
Console.WriteLine(result);
}
static void DefDef(int x = 10) {
Console.WriteLine(x * 2);
}
static void Main(string[] args)
{
//Calc(10.50, 5.25);
//Calc(10, 5);
//Person("John", "Snow");
DefDef(50);
DefDef();
DefDef(100);
}
}
}
No comments:
Post a Comment