suma=0while True: x=float(input()) if x==0: break if x<0: suma=suma+xprint(suma)
1.23 -4.56 77 -88.99 0
-93.55
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!