fork download
  1. #include <stdio.h>
  2.  
  3. struct point{
  4. double x[8];
  5. double y[8];
  6. }point;
  7.  
  8.  
  9. int main()
  10. {
  11.  
  12. FILE *fp;
  13. struct point points;
  14. int len = 8;
  15. int i = 0;
  16. int j = 0;
  17. int k = 0;
  18.  
  19. double a = 0;
  20. double b = 0;
  21. double c = 0;
  22.  
  23. double total = 0;
  24. int left=0;
  25. int right=0;
  26. int line = 0;
  27.  
  28. for (i=0;i<len;i++)
  29. {
  30. scanf("%lf %lf", &points.x[i],&points.y[i]);
  31. }
  32. for(i = 0; i < len;i++)
  33. printf("looking at point %.2f %.2f\n",points.x[i],points.y[i]);
  34.  
  35. return(0);
  36. }
Success #stdin #stdout 0s 10320KB
stdin
  2.3  7.5
  7.6  7.1
  8.5  3.0
  5.9  0.7
  1.0  2.0 
  5.1  5.8
  4.0  4.5 
  4.3  3.4
stdout
looking at point 2.30 7.50
looking at point 7.60 7.10
looking at point 8.50 3.00
looking at point 5.90 0.70
looking at point 1.00 2.00
looking at point 5.10 5.80
looking at point 4.00 4.50
looking at point 4.30 3.40