fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int i,n,p=2,p1,p2,count;
  5. scanf("\n %d%d",&n,&i);
  6. printf("%d",p);
  7. for(count=1;count<i;count++)
  8. {
  9. p1=2*p+1;
  10. printf(" %d\t",p1);
  11. p2=2*p1+1;
  12. printf("%d\t",p2);
  13. }
  14. // your code goes here
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 2164KB
stdin
20 2
stdout
2 5	11