Cyberprotol Indonesia

Pusat informasi dunia cyber dan teknologi
Follow Me

Praktikum 3 (Algoritma dan struktur data)



By  Firman Arifin     12/03/2010 03:18:00 PM    Labels: 

Program nilai mahasiswa

program nilai_mahasiswa;
uses wincrt;
label firman;
var
nama,grade:string;
stb,bulat,i:integer;
n_a,n_t,n_m,n_f:real;
ulang:char;
begin
writeln('nilai akhir mata kuliah Algoritma 1');
writeln('===================================');
writeln;
firman:
write('Nama Mahasiswa = ');readln(nama);
write('Stambuk = ');readln(stb);
write('Nilai Tugas = ');readln(n_t);
write('Nilai MID = ');readln(n_m);
write('Nilai Final = ');readln(n_f);
n_a:=20/100*n_t+30/100*n_m+50/100*n_f;
writeln('Nilai Akhir = ',n_a:3:2);
write('Dibulatkan = ');readln(bulat);
case bulat of
85..100: grade:='A';
70..84: grade:='B';
55..69: grade:='C';
40..59: grade:='D';
0..39: grade:='E';
end;
writeln('grade = ',grade);
writeln;
write('Input Lagi (y/n) =');readln(ulang);
writeln;
if ulang = 'y' then
goto firman
else
if ulang = 'n' then
writeln('##selesai##');
end.

layout:

About Firman Arifin

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas euismod diam at commodo sagittis. Nam id molestie velit. Nunc id nisl tristique, dapibus tellus quis, dictum metus. Pellentesque id imperdiet est.

No comments:

Post a Comment

Silahkan masukkan komentar sobat, komentar sobat sangat berarti buat saya


Contact Form

Name

Email *

Message *

Labels

Translate