fork(4) download
  1. #include <stdio.h>
  2. int main() {
  3. double x, sum = 0;
  4. while (EOF != scanf("%lf", &x))
  5. {
  6. sum += x;
  7. }
  8. printf("Summa %g", sum);
  9. }
Success #stdin #stdout 0s 3344KB
stdin
1 2.3 7 14
stdout
Summa 24.3