Untitled

 avatar
unknown
plain_text
2 years ago
526 B
4
Indexable
// ConsoleApplication38.cpp : Этот файл содержит функцию "main". Здесь начинается и заканчивается выполнение программы.
//
#include <string>
#include <iostream>
using namespace std;
int pow(int a, int b) {
	int i,c= a;
	for (i = 0; i < b -1 ; i++)
	{
		c*= a;
	}
	return c;
};

int main(){
	setlocale(LC_ALL, "Russian");
	cout << "Введите число и степень\n";
	int a, b;
	cin >> a >> b;
	cout << pow(a, b);


}

Editor is loading...