Advertisement
Guest User

Untitled

a guest
Jan 18th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.29 KB | None | 0 0
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include <algorithm>
  3. #include <iostream>
  4. #include <vector>
  5. using namespace std;
  6.  
  7. int cd(int a, int n) {
  8.     for (int i = 0; i < n; ++i) {
  9.         a = a * a;
  10.     }
  11. }
  12. int main() {
  13.     int a;
  14.     cin >> a;
  15.     int n;
  16.     cin >> n;
  17.     cd(a, n);
  18.     cout << a;
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement