コード例 #1
0
 public void Task2Test()
 {
     Task2 instance = new Task2();
     Assert.AreEqual(80, instance.GetMax(80, -1231231223));
     Assert.AreEqual(int.MaxValue, instance.GetMax(80, int.MaxValue));
     Assert.AreEqual(80, instance.GetMax(80, int.MinValue));
     Assert.AreEqual(5, instance.GetMaxNumber(1, 0, 5, 0, -1));
 }
コード例 #2
0
ファイル: Task2.cs プロジェクト: huoxudong125/TelerikAcademy
 static void Main(string[] args)
 {
     //Write a method GetMax() with two parameters that returns the bigger of two integers. Write a program that reads 3 integers from the console and prints the biggest of them using the method GetMax().
     int a = 0, b = 0, c = 0;
     a = int.Parse(Console.ReadLine());
     b = int.Parse(Console.ReadLine());
     c = int.Parse(Console.ReadLine());
     Task2 inst = new Task2();
     Console.WriteLine(inst.GetMaxNumber(a, b, c));
 }