//* exponent or power of x using loop
#include <bits/stdc++.h>
using namespace std;
int main()
{
int x = 1, power = 0, temp = 0;
cin >> x >> power;
temp = x;
for (int i = 1; i < power; i++)
{
x *= temp;
}
cout << x << endl;
return 0;
}
Code Example |
---|
Cpp :: c++ insert variable into string |
Cpp :: looping in map c++ |
Cpp :: c++ variable types |
Cpp :: how to sort array in c++ |
Cpp :: stack class implementation to file unix-style in c++ |
Cpp :: put text on oled |
Cpp :: c++ uint8_t header |
Cpp :: one away coding question |
Cpp :: cpp read from file |
Cpp :: one dimensiol array to two dimen c++ |
Cpp :: heredar constructor c++ |
Cpp :: c++ get data type |
Cpp :: c++ recorrer string |
Cpp :: converting char to integer c++ |
Cpp :: c++ formatting |
Cpp :: input c++ |
Cpp :: declare a tab c++ |
Cpp :: cpp malloc |
Cpp :: casting to a double in c++ |
Cpp :: executing an opencv c++ code |
Cpp :: c++ string to char* |
Cpp :: remove linked list elements leetcode |
Cpp :: invert a binary tree |
Cpp :: memset c++ |
Cpp :: Write a C++ program using constructor |
Cpp :: set to vector c++ |
Cpp :: C++ file . |
Cpp :: why the << operator is friend |
Cpp :: time_t c++ stack overflow |
Cpp :: c++ vector move element |