Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program {
- public static int Main() {
- Console.Write("Введите число : ");
- int num = int.Parse(Console.ReadLine());
- Console.Write("Введите степень : ");
- int n = int.Parse(Console.ReadLine());
- int c = num, f = num;
- for(int i = 1; i < n; i++){
- for(int j = 1 ; j < num; j++){
- c = c + f;
- }
- f = c;
- }
- Console.WriteLine("{0} ^ {1} = {2}", num, n, f);
- Console.ReadKey();
- return 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement