C# math class methods tutorial example explained
#C# #Math #methods
using System;
namespace MyFirstProgram
{
class Program
{
static void Main(string[] args)
{
double x = 3;
double y = 5;
double a = Math.Pow(x, 2);
double b = Math.Sqrt(x);
double c = Math.Abs(x);
double d = Math.Round(x);
double e = Math.Ceiling(x);
double f = Math.Floor(x);
double g = Math.Max(x, y);
double h = Math.Min(x, y);
Console.WriteLine(a);
Console.ReadKey();
}
}
}
#C# #Math #methods
using System;
namespace MyFirstProgram
{
class Program
{
static void Main(string[] args)
{
double x = 3;
double y = 5;
double a = Math.Pow(x, 2);
double b = Math.Sqrt(x);
double c = Math.Abs(x);
double d = Math.Round(x);
double e = Math.Ceiling(x);
double f = Math.Floor(x);
double g = Math.Max(x, y);
double h = Math.Min(x, y);
Console.WriteLine(a);
Console.ReadKey();
}
}
}
- Category
- Bro Code
- Tags
- C#, programming, tutorial

Be the first to comment