fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. const int N = 10;
  6. int an = 0;
  7. for(int i = 0; i < N ; ++i)
  8. an = (an + 1) << 1;
  9. cout << "Dla N = " << N << " a(n) = " << an << endl;
  10. return 0;
  11. }
Success #stdin #stdout 0s 3140KB
stdin
Standard input is empty
stdout
Dla N = 10 a(n) = 2046