0% found this document useful (0 votes)
87 views2 pages

Uses Wincrt

The document declares variables to store student data including name, student ID, major, score, and grade for up to 20 students. It prompts the user to enter the number of students and then uses a for loop to input each student's data and assign a grade based on their score. Finally, it outputs a table displaying all the collected student data.

Uploaded by

Muchlas Yulianto
Copyright
© Attribution Non-Commercial (BY-NC)
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)
87 views2 pages

Uses Wincrt

The document declares variables to store student data including name, student ID, major, score, and grade for up to 20 students. It prompts the user to enter the number of students and then uses a for loop to input each student's data and assign a grade based on their score. Finally, it outputs a table displaying all the collected student data.

Uploaded by

Muchlas Yulianto
Copyright
© Attribution Non-Commercial (BY-NC)
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/ 2

USES WINCRT;

VAR X, Y, I, JLHMHS : INTEGER; NAMA, NIM, JURUSAN, NILHURUF: ARRAY [1..20] OF STRING; NILANGKA : ARRAY [1..20] OF INTEGER;

BEGIN WRITE('JUMLAH MAHASISWA:');READLN(JLHMHS); FOR I:=1 TO JLHMHS DO BEGIN CLRSCR; WRITE('NAMA MAHASISWA:');READLN(NAMA[I]); WRITE('NIM :');READLN(NIM[I]); WRITE('JURUSAN :');READLN(JURUSAN[I]); WRITE('NILANGKA :');READLN(NILANGKA[I]);

IF (NILANGKA[I]>=0) AND (NILANGKA[I]<=40) THEN NILHURUF[I]:='E' ELSE IF (NILANGKA[I]>=40) AND (NILANGKA[I]<=55) THEN NILHURUF[I]:='D' ELSE IF (NILANGKA[I]>=55) AND (NILANGKA[I]<=70) THEN NILHURUF[I]:='C' ELSE IF (NILANGKA[I]>70) AND (NILANGKA[I]<=80) THEN NILHURUF[I]:='B' ELSE IF (NILANGKA[I]>80) AND (NILANGKA[I]<=100) THEN NILHURUF[I]:='A' ELSE NILHURUF [I]:='SALAH DATA' END; CLRSCR; FOR Y:= 1 TO 70 DO WRITE('-');

GOTOXY(2,2);WRITE('NAMA MAHASISWA'); GOTOXY(20,2);WRITE('N I M'); GOTOXY(30,2);WRITE('JURUSAN'); GOTOXY(45,2);WRITE('N ANGKA'); GOTOXY(60,2);WRITELN('N HURUF'); FOR Y:= 1 TO 70 DO WRITE ('-'); FOR I:= 1 TO JLHMHS DO BEGIN GOTOXY(2,3+I);WRITE(NAMA [I]); GOTOXY(20,3+I);WRITE(NIM [I]); GOTOXY(30,3+I);WRITE(JURUSAN[I]); GOTOXY(45,3+I);WRITE(NILANGKA[I]); GOTOXY(60,3+I);WRITE(NILHURUF[I]); END; WRITELN; FOR Y := 1 TO 10 DO WRITE ('-'); END.

You might also like