←to practical programming

Exercise "math"

  1. Calculate (using System.Math class) 2, eπ, πe and save the results in variables, like
    double sqrt2=Sqrt(2.0);
    
    Write the values of these variables out, like
    Write($"sqrt(2) = {sqrt2}\n");
    
    Check that the results are correct (by applying the corresponding inverse functions), like
    Write($"sqrt2*sqrt2 = {sqrt2*sqrt2} (should be equal 2)\n");
    

Hints

In the Makefile, you should redirect the output of your program to a file, like
Out.txt: main.exe
	mono main.exe > Out.txt

main.exe: main.cs
	mcs main.cs