Subtract() public method

public Subtract ( int a, int b ) : int
a int
b int
return int
コード例 #1
0
 static void Main(string[] args)
 {
     Math.Add(3, 6);
     Math.Subtract(6, 3);
     Math.Multiply(2, 5);
     Math.Divide(100, 2);
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: Softwire/Learning-C-sharp
 // Definitely a personal style thing, but I always remove Main's argument if it's unused - not that I've written more than about 10 Main statements in real code.
 // I shan't repeat that comment everywhere, obviously.
 static void Main(string[] args)
 {
     var math = new Math();
     Console.WriteLine(math.Add(3, 4));
     Console.WriteLine(math.Subtract(3, 4));
     Console.WriteLine(math.Multiply(3, 4));
     Console.WriteLine(math.Divide(3, 4));
 }