Advertisement
spasnikolov131

Untitled

Feb 3rd, 2023
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Math_Power
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. double n = int.Parse(Console.ReadLine());
  10. int power = int.Parse(Console.ReadLine());
  11. RaiseToPower(n, power);
  12. }
  13. static double RaiseToPower(double n, int power)
  14. {
  15. double result = 0;
  16.  
  17. result = Math.Pow(n, power);
  18. Console.WriteLine(result);
  19. return result;
  20. }
  21. }
  22. }
  23.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement