Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Введите число");
- double N = Convert.ToDouble(Console.ReadLine());
- Console.WriteLine("Введите степень");
- int stepen = Convert.ToInt32(Console.ReadLine());
- Console.WriteLine(N + " в "+stepen + " степени " + myPow(N,stepen));
- Console.ReadKey();
- }
- static double myPow(double N, int stepen)
- {
- double mnoz = 1;
- for (int i = 1; i <= stepen; i++)
- {
- mnoz *= N;
- }
- return mnoz;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment