fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. float f1, f2, f3;
  5. double d1, d2, d3;
  6. long double l1, l2, l3;
  7. fscanf(stdin, "%f%f%f", &f1, &f2, &f3);
  8. fscanf(stdin, "%lf%lf%lf", &d1, &d2, &d3);
  9. fscanf(stdin, "%Lf%Lf%Lf", &l1, &l2, &l3);
  10.  
  11. printf("floats: %f %f %f\n", f1, f2, f3);
  12. printf("doubles: %f %f %f\n", d1, d2, d3);
  13. printf("longs: %Lf %Lf %Lf\n", l1, l2, l3);
  14.  
  15. return 0;
  16. }
Success #stdin #stdout 0s 1792KB
stdin
-2.628489e-03 -1.194542e-03 -1.073491e-02
-2.628489e-03 -1.194542e-03 -1.073491e-02
-2.628489e-03 -1.194542e-03 -1.073491e-02
stdout
floats: -0.002628 -0.001195 -0.010735
doubles: -0.002628 -0.001195 -0.010735
longs: -0.002628 -0.001195 -0.010735