Answers for "Math C#"

C#
2

math operations in c#

Console.WriteLine("" + x);
            Console.WriteLine("x +=" + (x += 5));
            Console.WriteLine("x -=" + (x -= 5));
            Console.WriteLine("x *=" + (x *= 5));
            Console.WriteLine("x /=" + (x /= 5));
            Console.WriteLine("x %=" + (x %= 3));
            Console.WriteLine("x &=" + (x &= 5));
            Console.WriteLine("x ^=" + (x ^= 5));
            Console.WriteLine("x >>=" + (x >>= 5));
            Console.WriteLine("x <<=" + (x <<= 5));
Posted by: Guest on May-10-2021
0

Math C#

Math.Abs(-4.7);
// returns the absolute (positive) value of x
Posted by: Guest on September-24-2021
0

Math C#

Math.Min(5, 10);
//find the lowest value
Posted by: Guest on September-24-2021
0

Math C#

Math.Round(9.99);
// rounds a number to the nearest whole number
Posted by: Guest on September-24-2021
0

Math C#

Math.Sqrt(64);
//Returns the square root
Posted by: Guest on September-24-2021

C# Answers by Framework

Browse Popular Code Answers by Language