fork download
  1. suma=0
  2. while True:
  3. x=float(input())
  4. if x==0:
  5. break
  6. if x<0:
  7. suma=suma+x
  8. print(suma)
Success #stdin #stdout 0.11s 14168KB
stdin
1.23
-4.56
77
-88.99
0
stdout
-93.55