0% found this document useful (0 votes)
49 views

Nibroos Aurore (XI MIPA 6/30)

This program is designed to record and summarize student data including name, class, test scores, final grade, and grade classification. It defines a record data type to store student information and uses arrays to hold multiple student records. The main procedures allow the user to input data, display it in a table, calculate final grades and grade classifications, and output the full results. The program loops to allow the user to re-enter data or view the results repeatedly until exiting.

Uploaded by

nibroos aurore
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views

Nibroos Aurore (XI MIPA 6/30)

This program is designed to record and summarize student data including name, class, test scores, final grade, and grade classification. It defines a record data type to store student information and uses arrays to hold multiple student records. The main procedures allow the user to input data, display it in a table, calculate final grades and grade classifications, and output the full results. The program loops to allow the user to re-enter data or view the results repeatedly until exiting.

Uploaded by

nibroos aurore
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Nibroos Aurore (XI MIPA 6/30)

Program record_array_siswa;

Uses crt;

Type

Datasiswa = record

Nama : string [15];

Kelas : string [5];

UTS : real;

UAS : real;

Nilai Akhir : real;

Ket : shortstring;

Var

data : array [1..10] of Datasiswa;

i, n : integer;

pilih : char;

begin

clrscr

nilai akhir := 0,6*UAS+0,4*UTS;

Procedure input;

Begin

Gotoxy(15,1); writeln(‘Data Siswa’);

Gotoxy(15,2); writeln(‘--------------‘); writeln;

Write(‘Masukkan Jumlah Siswa :’); readln(n);

For i := 1 to n do

Begin
With data [i] do

Begin

Writeln(‘Data Ke-‘,i);

Writeln(‘--------------‘);

Write(‘Nama :’); readln(Nama);

Write(‘Kelas :’); readln(Kelas);

Write(‘UTS :’); readln(UTS);

Write(‘UAS :’); readln(UAS);

End;

End;

End;

Procedure table;

Begin

Writeln(‘-----------------------------------------------------------------‘);

Writeln(‘l No. l Nama l Kelas l UTS l UAS l Nilai Akhir l Ket l’);

Writeln(‘-----------------------------------------------------------------‘);

For i to n do

Begin

Gotoxy(1, i+3);

Writeln(‘l l l l l l l l’);

End;

Writeln(‘______________________________________________’);

End;

Procedure output;

Begin

Tabel;

For i:=1 to n do
Begin

With data[i] do

Begin

If (Nilai Akhir>=80) then Ket:=’A’ else;

If (Nilai Akhir>=70) then Ket:=’B’ else;

If (Nilai Akhir>=60) then Ket:=’C’ else;

If (Nilai Akhir>=50) then Ket:=’D’ else;

Ket:=’E’

End;

End;

For i:= 1 to n do

Begin

With data[i] do

Begin

Gotoxy(3, i+3); writeln (i);

Gotoxy(9, i+3); writeln(Nama);

Gotoxy(21, i+3); writeln(Kelas);

Gotoxy(45, i+3); writeln(UTS);

Gotoxy(55, i+3); writeln(UAS);

Gotoxy(70, i+3); writeln(Nilai Akhir);

Gotoxy(75, i+3); writeln(Ket);

End;

End;

Readln;

End;

Begin

Repeat

Gotoxy(20, 1); writeln(‘Data Siswa’);


Gotoxy(20, 2); writeln(‘--------------‘)

Writeln;

Writeln(‘[1] Rekap Data’);

Writeln(‘[2] Hasil Rekap’);

Writeln(‘[3] Keluar’); writeln;

Writeln(‘Pilih :’);

Pilih:= readkey;

Case Pilih of

‘1’ : input;

‘2’ : output;

‘3’ : exit;

End;

Until pilih = ‘3’

End.

You might also like