Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.16 KB | None | 0 0
  1. void p1(int n, t1 a)
  2. {
  3.     for (int i = 0; i<n; i++) {
  4.         int potega = 1;
  5.         if (i>0)
  6.         {
  7.             potega = a[i - 1];
  8.             potega *= 2;
  9.  
  10.         }
  11.         a[i] = potega;
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement