Advertisement
YavorGrancharov

Math_Power_(Methods)

Jun 12th, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.35 KB | None | 0 0
  1. using System;
  2.                    
  3. public class Program
  4. {
  5.     public static void Main()
  6.     {
  7.         double n = double.Parse(Console.ReadLine());
  8.         int power = int.Parse(Console.ReadLine());
  9.         double result = ToPowerOf(n, power);
  10.         Console.WriteLine(result);
  11.     }
  12.    
  13.     static double ToPowerOf(double n, int power) {
  14.         double result = Math.Pow(n, power);
  15.         return result;
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement