Pascal

i just learn paskal in time i will write , how to buil program in paskal just it simple and i give for reader before you read here you have to learn algoritma because that is very importain for make a program .,

ok let’t us Coding ….

program tugas_struktur_data;
uses crt;

var
nama[i]:array[1..5] of string;
uts[i]:array[1..5] of integer;
uas[i]:array[1..5] of integer;
hasil[i]:array[1..5] of double;
a,i,pil :integer;
car :string;

procedure input();
begin
writeln(‘MASUKAN JUMLAH DATA MHS ?’);
readln(pil);
for i:=1 to pil do
begin
write(‘Nama Mhs :’);readln(nama[i]);
write(‘Nilai UTS:’);readln(uts[i]);
write(‘Nilai UAS:’);readln(uas[i]);
end;
end;

procedure proses();
begin
hasil[i] :=(uts[i] + uas[i])/2;
end;

procedure tampil();
begin
writeln(‘****MENAMPILKAN NILAI MHS****’);
for i :=1 to pil do
begin
writeln(‘Nama :’,nama[i]);
writeln(‘UTS :’,uts[i]);
writeln(‘UAS :’,uas[i]);
writeln(‘Hasil angka:’,hasil[i]);

end;
readln;

end;
procedure cari();
begin
writeln(‘Masukan Nama Mhs yang akan di cari’);
readln(car);
if nama[i]=car then
tampil()
else
writeln(‘Maaf Nama MHS yang anda cari tidak temukan’);
end;
procedure menu();
begin
clrscr;
writeln(‘==== Main Menu ===’);
writeln(‘1.INPUT DATA MAHASISWA’);
writeln(‘2.MEANAMPILKAN DATA MAHASISWA’);
writeln(‘3.CARI DATA MHS’);
writeln(‘4.EXIT’);
readln(a);
case a of
1:
begin
input();
proses();
end;

2:tampil();
3:cari();
4:exit;
end;
end;

begin
repeat
menu();
readln;
clrscr;
until a =4;
end.
Please To try this code if you have an Error Comment In Blog ,,ok

Diterbitkan oleh

Taken

i need somebody for help me to make anything what i need

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s