SHARE
TWEET

Latihan 4 Program Consol Free Pascal

stevennathaniel Dec 23rd, 2013 157 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program project1;
  2.  
  3. {$mode objfpc}{$H+}
  4.  
  5. uses
  6.   {$IFDEF UNIX}{$IFDEF UseCThreads}
  7.   cthreads,
  8.   {$ENDIF}{$ENDIF}
  9.   Classes
  10.   { you can add units after this };
  11.  
  12.    var
  13. Mark: Integer;
  14. begin
  15.  
  16.   write('Silahkan masukan nilai muridnya: ');
  17.  
  18.   readln(Mark);
  19.  
  20.   writeln;
  21.  
  22.   case Mark of
  23.  
  24.   0 .. 39  : writeln('Nilai bagi murid: F');
  25.   40 .. 49 : writeln('Nilai bagi murid: E');
  26.   50 .. 59 : writeln('Nilai bagi murid: D');
  27.   60 .. 69 : writeln('Nilai bagi murid: C');
  28.   70 .. 84 : writeln('Nilai bagi murid: B');
  29.   85 .. 100 : writeln('Nilai bagi murid: A');
  30.  
  31.   else
  32.  
  33.     writeln('Nilainya Salah');
  34.  
  35.     end;
  36.  
  37. write('Tekanlah tombol ENTER untuk menutup');
  38.  
  39. readln;
  40.  
  41.  
  42.  
  43.  
  44.  
  45. end.
RAW Paste Data
Top