program kelulusan;
uses wincrt; var m, i, ing, rata, r, nilai: real; ket : string[65]; ulang : char; begin ulang := 'y'; while ulang ='y' do begin clrscr; writeln('PROGRAM KELULUSAN'); writeln('----------------'); write('masukkan nilai matematika ?'); readln(m); writeln; write('masukkan nilai bahasa Indonesia ?'); readln(i); writeln; write('masukkan nilai bahasa Inggris ?'); readln(ing); writeln; nilai:= m+i+ing; writeln('total = ',nilai:3:2); r:=3; rata:= nilai / r; writeln('rata-rata = ',rata:3:2); ket :='ket = TIDAK LULUS,<<< silahkan melakukan ujian ulang >>>'; if rata >= 60 then ket := 'ket = LULUS, <<< SELAMAT YA !! >>>'; writeln(ket); writeln; write('menghitung lagi (y/t) ?'); readln(ulang); if (ulang= 't') then; writeln; writeln('terima kasih.'); end; end.
|