View Code of Problem 73

#include <iostream>

using namespace std;

int main() {
    int n;
    cin >> n;
    int num = 1;
    while (n-- > 1) {
        num = (num + 1) * 2;
    }
    cout << num;
}

Double click to view unformatted code.


Back to problem 73