program tes;
uses wincrt;
var
absen,
tugas,
uas,
uts,
nilai_absen,
nilai_tugas,
nilai_uts,
nilai_uas,
total : real ;
begin
write ('absen ='); readln (absen);
write ('tugas ='); readln (tugas);
write ('uts ='); readln (uts);
write ('uas ='); readln (uas);
writeln;
begin
writeln (' tabel nilai ');
writeln ('---------------------------------------------------');
writeln ('| nilai | nilai | nilai | nilai | |');
writeln ('| absen | tugas | uts | uas | total |');
writeln ('---------------------------------------------------');
end;
repeat
nilai_absen:=0.1 * absen;
nilai_tugas:=0.2 * tugas ;
nilai_uts := 0.3 * uts ;
nilai_uas := 0.4 * uas ;
total :=nilai_absen + nilai_tugas + nilai_uts + nilai_uas;
writeln ('|',nilai_absen:9:0,'|',nilai_tugas:9:0,'|', nilai_uts:9:0,'|', nilai_uas:9:0,'|', total:9:0,'|');
until
absen > total ;
writeln ('---------------------------------------------------');
readln
end.
uses wincrt;
var
absen,
tugas,
uas,
uts,
nilai_absen,
nilai_tugas,
nilai_uts,
nilai_uas,
total : real ;
begin
write ('absen ='); readln (absen);
write ('tugas ='); readln (tugas);
write ('uts ='); readln (uts);
write ('uas ='); readln (uas);
writeln;
begin
writeln (' tabel nilai ');
writeln ('---------------------------------------------------');
writeln ('| nilai | nilai | nilai | nilai | |');
writeln ('| absen | tugas | uts | uas | total |');
writeln ('---------------------------------------------------');
end;
repeat
nilai_absen:=0.1 * absen;
nilai_tugas:=0.2 * tugas ;
nilai_uts := 0.3 * uts ;
nilai_uas := 0.4 * uas ;
total :=nilai_absen + nilai_tugas + nilai_uts + nilai_uas;
writeln ('|',nilai_absen:9:0,'|',nilai_tugas:9:0,'|', nilai_uts:9:0,'|', nilai_uas:9:0,'|', total:9:0,'|');
until
absen > total ;
writeln ('---------------------------------------------------');
readln
end.
algoritma dasar
15.24
0 Responses to "jawaban uas (Turbo Pascal)"
Posting Komentar