Advertisement
SuperKirchik

2 ^ n

Apr 21st, 2020
297
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n;
  8.     cin >> n;
  9.     int a = 1;
  10.     for(int i = 1; i <= n; i++){
  11.         a*=2;
  12.     }
  13.     cout << a << endl;
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement