kozixfuck

Zadanie5kolos16_01

Jan 16th, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.24 KB | None | 0 0
  1. static double Potega( double n, double m)
  2. {
  3. if(n < 0 || m < 0 ) return 9999999;
  4. double w = 1;
  5. for(int i = 0; i < m; i++)
  6.     w*=n;
  7.     return w;
  8. }
  9. static void Main(string[] args)
  10. {
  11. Console.WriteLine(Potega(2,0));
  12. Console.ReadKey(true);
  13. }
Add Comment
Please, Sign In to add comment