Write an app that tests whether the examples of the Math class actually produce the indicated results.
```
// Solution: MathTest.cs
// Testing the Math class methods.
using System;
class MathTest
{
static void Main()
{
Console.WriteLine($"Math.Abs(23.7) = {Math.Abs(23.7)}");
Console.WriteLine($"Math.Abs(0.0) = {Math.Abs(0.0)}");
Console.WriteLine($"Math.Abs(-23.7) = {Math.Abs(-23.7)}");
Console.WriteLine($"Math.Ceiling(9.2) = {Math.Ceiling(9.2)}");
Console.WriteLine($"Math.Ceiling(-9.8) = {Math.Ceiling(-9.8)}");
Console.WriteLine($"Math.Cos(0.0) = {Math.Cos(0.0)}");
Console.WriteLine($"Math.Exp(1.0) = {Math.Exp(1.0)}");
Console.WriteLine($"Math.Exp(2.0) = {Math.Exp(2.0)}");
Console.WriteLine($"Math.Floor(9.2) = {Math.Floor(9.2)}");
Console.WriteLine($"Math.Floor(-9.8) = {Math.Floor(-9.8)}");
Console.WriteLine($"Math.Log(Math.E) = {Math.Log(Math.E)}");
Console.WriteLine($"Math.Log(Math.E * Math.E) = {Math.Log(Math.E * Math.E)}");
Console.WriteLine($"Math.Max(2.3, 12.7) = {Math.Max(2.3, 12.7)}");
Console.WriteLine($"Math.Max(-2.3, -12.7) = {Math.Max(-2.3, -12.7)}");
Console.WriteLine($"Math.Min(2.3, 12.7) = {Math.Min(2.3, 12.7)}");
Console.WriteLine($"Math.Min(-2.3, -12.7) = {Math.Min(-2.3, -12.7)}");
Console.WriteLine($"Math.Pow(2.0, 7.0) = {Math.Pow(2.0, 7.0)}");
Console.WriteLine($"Math.Pow(9.0, 0.5) = {Math.Pow(9.0, 0.5)}");
Console.WriteLine($"Math.Sin(0.0) = {Math.Sin(0.0)}");
Console.WriteLine($"Math.Sqrt(900.0) = {Math.Sqrt(900.0)}");
Console.WriteLine($"Math.Tan(0.0) = {Math.Tan(0.0)}");
}
}
```
Math.Abs(23.7) = 23.7
Math.Abs(0.0) = 0
Math.Abs(-23.7) = 23.7
Math.Ceiling(9.2) = 10
Math.Ceiling(-9.8) = -9
Math.Cos(0.0) = 1
Math.Exp(1.0) = 2.71828182845905
Math.Exp(2.0) = 7.38905609893065
Math.Floor(9.2) = 9
Math.Floor(-9.8) = -10
Math.Log(Math.E) = 1
Math.Log(Math.E * Math.E) = 2
Math.Max(2.3, 12.7) = 12.7
Math.Max(-2.3, -12.7) = -2.3
Math.Min(2.3, 12.7) = 2.3
Math.Min(-2.3, -12.7) = -12.7
Math.Pow(2.0, 7.0) = 128
Math.Pow(9.0, 0.5) = 3
Math.Sin(0.0) = 0
Math.Sqrt(900.0) = 30
Math.Tan(0.0) = 0
You might also like to view...
A(n) ________ can be used to organize your slides similar to using folders to organize your files
Fill in the blank(s) with correct word
To display the History panel as shown in the accompanying figure, tap or click the History button on the vertical dock of minimized panels.
Answer the following statement true (T) or false (F)