Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4.  
  5. FILE * fStock;
  6.  
  7. fStock = fopen("TSLA.txt" , "r");
  8.  
  9. int count=0;
  10.  
  11. if(fStock != NULL)
  12.  
  13. {
  14.  
  15. char singleLine [10];
  16.  
  17. fgets(singleLine, 10, fStock);
  18.  
  19. while("feof(fStock)" !=NULL);
  20. }
  21.  
  22. {
  23.  
  24. if(count==1);
  25.  
  26. else(count++);
  27.  
  28. int x1, y1, x2, y2;
  29.  
  30. float slope;
  31.  
  32. slope = ((1.0)* (y2 - y1)) / (x2 - x1);
  33.  
  34. printf("Slope = %.2f\n", slope);
  35.  
  36. fclose(fStock);
  37. }
  38. return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement