Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. fscanf(file, "%d %s %s", &sectorSize, label, unit);
  2. outputBasic(sectorSize, label, unit);
  3.  
  4. fscanf(file, "%d %s %s", &sectorsPerTrack, label, unit);
  5. outputBasic(sectorsPerTrack, label, unit);
  6.  
  7. ///////////////////////////
  8.  
  9. trackSize = sectorSize * sectorsPerTrack;
  10. fprintf(stdout, "\ntemp: %d\n", sectorSize);
  11. //the above prints out 512
  12.  
  13. fprintf(stdout, "\ntemp: %d\n", sectorsPerTrack);
  14. //the above prints out 1000
  15.  
  16. fprintf(stdout, "\ntemp2: %f\n", trackSize);
  17. // 0.00000
  18. fprintf(stdout, "\ntemp2: %d\n", trackSize);
  19. // 0
  20.  
  21.  
  22. // this prints out the right answer
  23. double temp = 512;
  24. double temp2 = 1000;
  25. double temp3 = temp * temp2;
  26. fprintf(stdout, "\ntemp3: %f\n", temp3);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement