fork download
  1. #include <stdio.h>
  2. int main(void)
  3. {
  4. int x1,x;
  5. x1=1;
  6. do
  7. {
  8. x=2*x1+1;
  9. x1=x;
  10. }
  11. while(x<=1000);
  12. printf("%d\n",x);
  13. return 0;
  14. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
1023