C# Math.Pow Example – Programming, Pseudocode Example, C# Programming Example
Basic C# Console

C# Math.Pow Example

The Math.Pow() function returns the base to the exponent power, that is, baseexponent.

The Math.Pow method is used to calculate the exponent value of a number. The method takes two parameters. The first parameter is the base and the second parameter is the force. Method can used for all number types. After calculating the pow method returns double type

if you enter the second number negative, the method calculate fractional exponentiation.  Ex:  Math.Pow(2,-2) =1/(22) = 0,25

In this tutorial, we will learn how to take input from user and and display output in C# using various methods

Usage:

 

Example:

Output:

C# Math.Pow Negative Exponent Example

Output:

 

C# Math.Pow Form Example:

Output:

Code:

 

 

 

 

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.