Home » » Program Nilai Array dalam Record

Program Nilai Array dalam Record

Written By Unknown on Rabu, 16 Mei 2012 | 19.30

program nilai;
uses wincrt;
type
    mhs= record
    nama:array[1..100] of string [25];
    nim:array [1..100] of string [11];
    mk:array [1..100] of string [15];
    na:array [1..100] of char;
    end;
var
data:mhs;
i,n:integer;
begin
write('masukkan banyak data:');readln(n);
for i:= 1 to n do
begin
write('masukkan nama    :');readln(data.nama[i]);
write('masukkan Nim     :');readln(data.nim[i]);
write('masukkan matakuliah:');readln(data.mk[i]);
write('masukkan nilai akhir:');readln(data.na[i]);
end;
clrscr;
for i:= 1 to n do
begin
writeln('nama    :',data.nama[i]);
writeln('Nim     :',data.nim[i]);
writeln('matakuliah:',data.mk[i]);
writeln('nilai akhir:',data.na[i]);
if(data.na[i]='D') or (data.na[i]='d') or (data.na[i]='E') or (data.na[i]='e') then
begin
writeln('anda perlu mengulang')
end
else
begin
writeln('anda tidak perlu mengulang');
end;
end;
end.
Share this article :

0 komentar:

Posting Komentar

Terimakasih Telah membaca artikel kami. Silahkan tinggalkan komentar anda disini.

 
Support : Dunia Matematika | Dunia Fisik dan Fiksi
Copyright © 2013. Blog Berbagi Ilmu - All Rights Reserved
Template Created by AM Published by Aeroplane
Proudly powered by Blogger