Hodge-1053

Disk Bad Sectors Pascal Program

Jul 26th, 2016
8,003
0
Never
4
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.70 KB | None | 0 0
  1. program sectors;
  2.  
  3. uses crt;
  4.  
  5. const    bytes_per_sector       =       512;
  6.  
  7. var      bs,final       :       Integer;
  8.          disk           :       string;
  9.          yo             :       Char;
  10.  
  11. begin
  12.      repeat {*** enter the details ***}
  13.      clrscr;
  14.      write('Enter your disk details: ');
  15.      readln(disk);
  16.      writeln;
  17.      write('Enter the number of bytes in bad sectors: ');
  18.      readln(bs);
  19.      writeln;
  20.  
  21. { *** Here's where we work out how many bad clusters are on the disk ***}
  22.      final:=bs div bytes_per_sector;
  23.  
  24.      writeln('Your ',disk,' disk has ',final,' bad clusters on it.');
  25.  
  26.      gotoxy(1,24);
  27.      write('Again? ');
  28.      readln(yo);
  29.      until yo in ['n','N'];
  30. end.
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • Syizuxtrn
    167 days
    # text 0.19 KB | 0 0
    1. Best t33n active cpx link daily updates!
    2.  
    3. Copy and paste the link in a new browser tab and then hit enter!
    4.  
    5. https://crazyporn.xxx/members/157354/?asgtbndr=1&play=true&spon=adworld&zone=400
    6.  
Add Comment
Please, Sign In to add comment