Pascal (tugas 5)
program menampilkan_nilai;
uses crt;
var
c,b:string;
a:real;
begin
clrscr;
textcolor(red);
writeln('******************************');
textcolor(white);
writeln('::: INPUT DATA MAHASISWA :::');
textcolor(red);
writeln('******************************');
textcolor(white);
write('NIM = '); readln(c);
writeln();
write('NAMA = '); readln(b);
writeln();
write('masukkan nilai anda = ');readln(a);
writeln;
if (a>=0) and (a<=49) then
writeln('nilai anda E')
else if (a>=50) and (a<=69) then
writeln('nilai anda D')
else if (a>=70) and (a<=79) then
writeln('nilai anda C')
else if (a>=80) and (a<89) then
writeln('nilai anda B')
else if (a>=90) and (a<=100) then
writeln('nilai anda A')
else if a>100 then
writeln('maaf anda telah menginput diatas nilai maksimal')
else if a<0 then
writeln('maaf anda telah menginput dibawah nilai minimum');
readln;
end.
uses crt;
var
c,b:string;
a:real;
begin
clrscr;
textcolor(red);
writeln('******************************');
textcolor(white);
writeln('::: INPUT DATA MAHASISWA :::');
textcolor(red);
writeln('******************************');
textcolor(white);
write('NIM = '); readln(c);
writeln();
write('NAMA = '); readln(b);
writeln();
write('masukkan nilai anda = ');readln(a);
writeln;
if (a>=0) and (a<=49) then
writeln('nilai anda E')
else if (a>=50) and (a<=69) then
writeln('nilai anda D')
else if (a>=70) and (a<=79) then
writeln('nilai anda C')
else if (a>=80) and (a<89) then
writeln('nilai anda B')
else if (a>=90) and (a<=100) then
writeln('nilai anda A')
else if a>100 then
writeln('maaf anda telah menginput diatas nilai maksimal')
else if a<0 then
writeln('maaf anda telah menginput dibawah nilai minimum');
readln;
end.
0 komentar:
Posting Komentar
Seorang blogger yang baik,, ketika telah ngunjungi sebuah blog dan mendapatkan informasi pasti akan meninggalkan komentar yang baik dan membangun