fork download
  1. INTEGER I,SUM
  2. SUM=0
  3. I=1
  4. 10 IF(I.EQ.0)GOTO 20
  5. SUM=SUM+I
  6. I=I*2
  7. GOTO 10
  8. 20 WRITE(6,100) SUM
  9. 100 FORMAT(16H 1+2+4+8+16+...=,I10)
  10. STOP
  11. END
Success #stdin #stdout 0s 3984KB
stdin
Standard input is empty
stdout
 1+2+4+8+16+...=        -1