fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int a,r;
  6. a=2;
  7. for(r=1;a<=1000;r++){
  8. a=3*a-2;
  9. if(a>=100&&a<=1000)
  10. printf("%d ",a);
  11.  
  12. }
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
244 730