Program Penilaian (pascal)

Program bilang_wow
Uses Crt;
Var
 Nil1, Nil2 : Integer;
 NilRata    : Real;
 Grade      : Char;
 Keterangan : String;
Begin
 ClrScr;
 Write('Masukan Nilai 1 : ');
 ReadLn(Nil1);
 Write('Masukan Nilai 2 : ');
 ReadLn(Nil2);

 NilRata := (Nil1 + Nil2)/2;
 WriteLn('Nilai Rata-Rata = ', NilRata:5:2);

 IF NilRata >= 90 THEN
 Begin
 Grade := 'A';
 Keterangan := 'AMAZING, TERUS LOE HARUS BILANG WOW !!!';
 End
 ELSE IF NilRata >= 80 THEN
 Begin
 Grade := 'B';
 Keterangan := 'KEREN'
 End
 ELSE IF NilRata >= 70 THEN
 Begin
 Grade := 'C';
 Keterangan := 'LUMAYAN DEH'
 End
 ELSE
 Begin
 Grade := 'E';
 Keterangan := 'MISSION FAILED, NGGAK USAH BILANG WOW!';
 End;

 WriteLn('Grade Nilai yang loe dapat = ',Grade);
 WriteLn('Keterangan Nilai           = ',Keterangan);

 ReadLn;
End.

Share on Google Plus

About Mustafa RF

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment