Advertisement
gospod1978

Methods/Math Pow

Oct 11th, 2019
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3.  
  4. namespace Methods
  5. {
  6.     public class Methods
  7.     {
  8.         public static void Main()
  9.         {
  10.  
  11.             double number = double.Parse(Console.ReadLine());
  12.  
  13.             double power = double.Parse(Console.ReadLine());
  14.  
  15.             Console.WriteLine(Result(number, power));
  16.         }
  17.  
  18.         public static double Result(double number, double power)
  19.         {
  20.             double result = Math.Pow(number, power);
  21.  
  22.             return result;
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement