| 26 Maret 2013 | 31 Comments |

Delphi: Tugas Pertemuan 6

Tags: , ,

Category: Kuliah, Tugas

Borland-DelphiBerikut adalah tugas yang saya berikan saat pertemuan 6 tentang pemilihan kondisi (nesting if), perhatikan petunjuk pengerjaan berikut:

  • Syarat nilai akhir untuk grade adalah A >= 80, B >= 70, C >= 60, D >= 50 dan E < 50
  • Syarat kelulusan adalah grade A, B dan C keterangannya LULUS, D keterangannya TIDAK LULUS dan grade E keterangannya GAGAL
  • Syarat lainnya adalah apabila kehadiran kurang dari 75% dari 24 kali pertemuan maka gradenya otomatis E dan keterangannya GAGAL
  • Tugas anda membuat algoritma/alur logikanya untuk menyelesaikan masalah di atas
  • Tugas diserahkan kepada saya melalui form komentar pada posting ini (di bagian bawah) dengan isian Nama diisi NIM Anda masing-masing, Email diisi dengan alamat email Anda dan Website/Blog boleh dikosongkan atau diisi Nama Anda. Jawaban tugas silahkan diketik/paste di kolom komentar, kemudian klik Submit Comment. Jawaban Anda akan dimoderasi dan tidak akan ditampilkan

Ilustrasinya kira-kira sebagai berikut 🙂 :

  • ketika dimasukkan nilai akhir misal 86 dan kehadiran 20 maka keterangan yang ditampilkan adalah grade A, LULUS
  • contoh lain, ketika dimasukkan nilai akhir 100 dan kehadiran 15 maka keterangan yang tampil adalah grade E, GAGAL
  • dimasukkan nilai akhir 25 dan kehadiran 10 maka tampil keterangan grade E, GAGAL

Selamat mengerjakan, jangan lupa batas waktu pengumpulan tugas adalah tanggal 28 Maret 2013 pukul 07.00 waktu internet 🙂



Comments (31)

Trackback URL | Comments RSS Feed

Sites That Link to this Post

  1. Delphi: Tugas Pertemuan 10 : AmazingLight.info | 11 April 2013
  1. unit Unit1;

    interface

    uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    Dialogs, ExtCtrls, StdCtrls;

    type
    TForm1 = class(TForm)
    GroupBox1: TGroupBox;
    Button1: TButton;
    Edit1: TEdit;
    Edit2: TEdit;
    Button2: TButton;
    Button3: TButton;
    Panel1: TPanel;
    Panel2: TPanel;
    Label1: TLabel;
    procedure FormCreate(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    private
    { Private declarations }
    public
    { Public declarations }
    end;

    var
    Form1: TForm1;

    implementation

    {$R *.dfm}

    procedure TForm1.FormCreate(Sender: TObject);
    begin
    button1.Caption :=’proses’;
    button2.Caption :=’lagi’;
    button3.Caption :=’close’;

    panel1.Caption :=’grade’;
    panel2.Caption :=’kelulusan’;

    edit1.Text :=’0′;
    edit2.Text :=’0′;
    end;

    procedure TForm1.Button3Click(Sender: TObject);
    begin
    close;
    end;

    procedure TForm1.Button2Click(Sender: TObject);
    begin
    button1.Caption :=’proses’;
    button2.Caption :=’lagi’;
    button3.Caption :=’close’;

    panel1.Caption :=’grade’;
    panel2.Caption :=’kelulusan’;

    edit1.Text :=’0′;
    edit2.Text :=’0′;
    end;

    procedure TForm1.Button1Click(Sender: TObject);
    var
    NA, hadir : integer;

    begin
    NA :=strtoint(edit1.Text);
    hadir :=strtoint(edit2.Text);

    if NA >=80 then
    panel1.Caption :=’A’ else
    if NA >=70 then
    panel1.Caption :=’B’ else
    if NA >=60 then
    panel1.Caption :=’C’ else
    if NA >=50 then
    panel1.Caption :=’D’ else
    panel1.Caption :=’E’;

    if NA =50 then
    panel2.Caption :=’TIDAK LULUS’ else
    panel2.Caption :=’LULUS’;

    if hadir <18 then
    panel2.Caption :='GAGAL' else
    if hadir <=24 then
    panel2.Caption :='LULUS' else
    panel2.Caption :='error';

    if hadir <18 then
    panel1.Caption :='E' else
    if hadir = 80 then panel1.Caption :=’A’ else
    if na >= 70 then panel1.Caption :=’B’ else
    if na >= 60 then panel1.Caption :=’C’ else
    if na >= 50 then panel1.Caption :=’D’ else

    panel1.caption := ‘error’

    end;

    end.

  2. unit Unit1;

    interface

    uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    Dialogs, ExtCtrls, StdCtrls;

    type
    TForm1 = class(TForm)
    GroupBox1: TGroupBox;
    Button1: TButton;
    Edit1: TEdit;
    Edit2: TEdit;
    Button2: TButton;
    Button3: TButton;
    Panel1: TPanel;
    Panel2: TPanel;
    Label1: TLabel;
    procedure FormCreate(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    private
    { Private declarations }
    public
    { Public declarations }
    end;

    var
    Form1: TForm1;

    implementation

    {$R *.dfm}

    procedure TForm1.FormCreate(Sender: TObject);
    begin
    button1.Caption :=’proses’;
    button2.Caption :=’lagi’;
    button3.Caption :=’close’;

    panel1.Caption :=’grade’;
    panel2.Caption :=’kelulusan’;

    edit1.Text :=’0′;
    edit2.Text :=’0′;
    end;

    procedure TForm1.Button3Click(Sender: TObject);
    begin
    close;
    end;

    procedure TForm1.Button2Click(Sender: TObject);
    begin
    button1.Caption :=’proses’;
    button2.Caption :=’lagi’;
    button3.Caption :=’close’;

    panel1.Caption :=’grade’;
    panel2.Caption :=’kelulusan’;

    edit1.Text :=’0′;
    edit2.Text :=’0′;
    end;

    procedure TForm1.Button1Click(Sender: TObject);
    var
    NA, hadir : integer;

    begin
    NA :=strtoint(edit1.Text);
    hadir :=strtoint(edit2.Text);

    if NA >=80 then
    panel1.Caption :=’A’ else
    if NA >=70 then
    panel1.Caption :=’B’ else
    if NA >=60 then
    panel1.Caption :=’C’ else
    if NA >=50 then
    panel1.Caption :=’D’ else
    panel1.Caption :=’E’;

    if NA =50 then
    panel2.Caption :=’TIDAK LULUS’ else
    panel2.Caption :=’LULUS’;

    if hadir <18 then
    panel2.Caption :='GAGAL' else
    if hadir <=24 then
    panel2.Caption :='LULUS' else
    panel2.Caption :='error';

    if hadir <18 then
    panel1.Caption :='E' else
    if hadir = 80 then panel1.Caption :=’A’ else
    if na >= 70 then panel1.Caption :=’B’ else
    if na >= 60 then panel1.Caption :=’C’ else
    if na >= 50 then panel1.Caption :=’D’ else

    panel1.caption := ‘error’

    end;

    end.

  3. C1157201048 berkata:

    Var
    na, absen : Integer;

    begin
    na:=StrToInt(edtna.Text);
    absen:= StrToInt(edtabsen.Text);

    If (na > 100) and (absen > 24) then
    begin
    pnlket.Caption := ‘Nilai Maksimal 100’;
    pnlgrade.Caption := ‘Maksimal 24 Kali’;
    end
    else IF (na >= 80) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘A’;
    end
    else IF (na >= 70) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘B’;
    end
    else IF (na >= 60) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘C’;
    end
    else IF (na >= 50) and (absen >= 18) then
    begin
    pnlket.Caption := ‘TIDAK LULUS’;
    pnlgrade.Caption := ‘D’;
    end
    else
    begin
    pnlket.Caption := ‘GAGAL’;
    pnlgrade.Caption := ‘E’;
    end
    end;

  4. C1157201031 berkata:

    Deklarasi

    NA, Hadir : Integer

    Deskripsi

    NA =strtoint(edit1)
    Hadir =strtoint(edit2)

    Jika NA >=80 maka
    Grade = A
    Jika Tidak, Jika NA >=70 maka
    Grade = B
    Jika Tidak, Jika NA >=60 maka
    Grade = C
    Jika Tidak, Jika NA >=50 maka
    Grade = D
    Jika Tidak = E

    Jika NA =50 maka
    Kelulusan = TIDAK LULUS
    Jika Tidak
    Kelulusan = LULUS

    Jika Hadir <18 maka
    Kelulusan = GAGAL
    Jika Hadir <=24 maka
    Kelulusan = LULUS
    Jika Tidak
    Kelulusan = error

    Jika hadir <18 maka
    Grade = E
    Jika Tidak
    Jika Hadir = 80 maka
    Grade = A
    Jika Tidak, Jika NA >= 70 maka
    Grade = B
    Jika Tidak, Jika NA >= 60 maka
    Grade = C
    Jika Tidak, Jika NA >= 50 maka
    Grade = D
    Jika Tidak
    Grade = error

    ATAU

    Deklarasi

    NA,hadir: integer
    grade: string

    Deskripsi
    NA :=strtoint(edit1)
    hadir :=strtoint(edit2)

    Jika NA >=80 maka
    Grade = A
    Jika hadir 18 maka
    Grade = E’
    Kelulusan = GAGAL

    Jika Tidak, Jika NA >=70 maka
    Grade = B
    Jika hadir 18 maka
    Grade = E’
    Kelulusan = GAGAL

    Jika Tidak, Jika NA >=60 maka
    Grade = C
    Jika hadir 18 maka
    Grade = E’
    Kelulusan = GAGAL

    Jika Tidak, Jika NA >=50 maka
    Grade = D;
    Jika hadir 18 maka
    Grade = E
    Kelulusan = GAGAL

    Jika Tidak
    Grade = Erorr

  5. C1157201046 berkata:

    var
    Na,absen:Integer;
    begin
    na:=StrToInt(edtna.Text);
    absen:= StrToInt(edtabsen.Text);

    If (na > 100) and (absen > 24) then
    begin
    pnlket.Caption := ‘Nilai Maksimal 100’;
    pnlgrade.Caption := ‘Maksimal 24 Kali’;
    end
    else IF (na >= 80) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘A’;
    end
    else IF (na >= 70) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘B’;
    end
    else IF (na >= 60) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘C’;
    end
    else IF (na >= 50) and (absen >= 18) then
    begin
    pnlket.Caption := ‘TIDAK LULUS’;
    pnlgrade.Caption := ‘D’;
    end
    else
    begin
    pnlket.Caption := ‘GAGAL’;
    pnlgrade.Caption := ‘E’;
    end
    end;

  6. C1157201048 berkata:

    C1157201046 says:
    Your comment is awaiting moderation.
    March 27, 2013 at 22:17

    var
    Na,absen:Integer;
    begin
    na:=StrToInt(edtna.Text);
    absen:= StrToInt(edtabsen.Text);

    If (na > 100) and (absen > 24) then
    begin
    pnlket.Caption := ‘Nilai Maksimal 100′;
    pnlgrade.Caption := ‘Maksimal 24 Kali’;
    end
    else IF (na >= 80) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘A’;
    end
    else IF (na >= 70) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘B’;
    end
    else IF (na >= 60) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘C’;
    end
    else IF (na >= 50) and (absen >= 18) then
    begin
    pnlket.Caption := ‘TIDAK LULUS’;
    pnlgrade.Caption := ‘D’;
    end
    else
    begin
    pnlket.Caption := ‘GAGAL’;
    pnlgrade.Caption := ‘E’;
    end
    end;

  7. C1257201139 berkata:

    unit Unit1;

    interface

    uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    Dialogs, StdCtrls, ExtCtrls;

    type
    TForm1 = class(TForm)
    grp1: TGroupBox;
    edt1: TEdit;
    Button1: TButton;
    pnl1: TPanel;
    Button2: TButton;
    Button3: TButton;
    edt2: TEdit;
    lbl1: TLabel;
    lbl2: TLabel;
    pnl2: TPanel;
    lbl3: TLabel;
    procedure Button3Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    private
    { Private declarations }
    public
    { Public declarations }
    end;

    var
    Form1: TForm1;
    NA,HADIR:INTEGER;

    implementation

    {$R *.dfm}

    procedure TForm1.Button3Click(Sender: TObject);
    begin
    Close;
    end;

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    NA :=strtoint(edt1.Text);
    hadir :=strtoint(edt2.Text);

    if NA >=80 then
    pnl1.Caption :=’A’ else
    if NA >=70 then
    pnl1.Caption :=’B’ else
    if NA >=60 then
    pnl1.Caption :=’C’ else
    if NA >=50 then
    pnl1.Caption :=’D’ else
    pnl1.Caption :=’E’;

    if NA =50 then
    pnl2.Caption :=’TIDAK LULUS’ else
    pnl2.Caption :=’LULUS’;

    if hadir <18 then
    pnl2.Caption :='GAGAL' else
    if hadir <=24 then
    pnl2.Caption :='LULUS' else
    pnl2.Caption :='error';

    if hadir <18 then
    pnl1.Caption :='E' else
    if hadir = 80 then pnl1.Caption :=’A’ else
    if na >= 70 then pnl1.Caption :=’B’ else
    if na >= 60 then pnl1.Caption :=’C’ else
    if na >= 50 then pnl1.Caption :=’D’ else
    if NA <= 50 then pnl1.Caption :='E' ELSE

    PNL1.CAPTION := 'EROR'
    //pnl2.caption := 'EROR'

    end;

    procedure TForm1.Button2Click(Sender: TObject);
    begin
    edt1.Text:='0';
    edt2.Text:='0';
    pnl1.Caption:='GRADE';
    PNL2.CAPTION:='KELULUSAN';
    end;

    end.

  8. C1157201047 berkata:

    na,Absen :integer;
    begin
    na:=StrToInt(edtna.Text);
    absen:= StrToInt(edtabsen.Text);

    If (na > 100) and (absen > 24) then
    begin
    pnlket.Caption := ‘Nilai Maksimal 100’;
    pnlgrade.Caption := ‘Maksimal 24 Kali’;
    end
    else IF (na >= 80) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘A’;
    end
    else IF (na >= 70) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘B’;
    end
    else IF (na >= 60) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘C’;
    end
    else IF (na >= 50) and (absen >= 18) then
    begin
    pnlket.Caption := ‘TIDAK LULUS’;
    pnlgrade.Caption := ‘D’;
    end
    else
    begin
    pnlket.Caption := ‘GAGAL’;
    pnlgrade.Caption := ‘E’;
    end
    end;

  9. C1157201047 berkata:

    var
    Na,absen:Integer;
    begin
    na:=StrToInt(edtna.Text);
    absen:= StrToInt(edtabsen.Text);

    If (na > 100) and (absen > 24) then
    begin
    pnlket.Caption := ‘Nilai Maksimal 100’;
    pnlgrade.Caption := ‘Maksimal 24 Kali’;
    end
    else IF (na >= 80) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘A’;
    end
    else IF (na >= 70) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘B’;
    end
    else IF (na >= 60) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘C’;
    end
    else IF (na >= 50) and (absen >= 18) then
    begin
    pnlket.Caption := ‘TIDAK LULUS’;
    pnlgrade.Caption := ‘D’;
    end
    else
    begin
    pnlket.Caption := ‘GAGAL’;
    pnlgrade.Caption := ‘E’;
    end
    end;

  10. C1157201084 berkata:

    Deklarasi

    NA,Hadir:integer

    Deskripsi

    NA=strtoint(edit1)
    Hadir=strtoint(edit2)

    jika NA>=80 maka
    Grade=A
    Jika tidak,jika NA>=70 maka
    Grade=B
    Jika tidak,jika NA>=60 maka
    Grade=C
    Jika tidak,jika NA>=50 maka
    Grade=D
    Jika Tidak=E

    Jika NA =50 maka
    Kelulusan = Tidak Lulus
    Jika Tidak
    Kelulusan = LULUS

    Jika Hadir <18 maka
    Kelulusan = GAGAL
    Jika Hadir <=24 maka
    Kelulusan = LULUS
    Jika Tidak
    Kelulusan = eror

    Jika Hadir <18 maka
    Grade = E
    Jika Tidak
    Jika Hadir =80 maka
    Grade = A
    Jika Tidak,Jika NA >=70 maka
    Grade = B
    Jika Tidak,Jika NA >=60 maka
    Grade = C
    Jika Tidak,Jika NA >=50 maka
    Grade = D
    Jika Tidak
    Grade = eror

  11. C1157201037 (intan) berkata:

    unit P6L3;

    interface

    uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    Dialogs, StdCtrls, ExtCtrls;

    type
    TForm1 = class(TForm)
    GroupBox1: TGroupBox;
    Edit1: TEdit;
    Edit2: TEdit;
    bLagi: TButton;
    bClose: TButton;
    bProses: TButton;
    bGrade: TPanel;
    bKelulusan: TPanel;
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    procedure FormCreate(Sender: TObject);
    procedure bCloseClick(Sender: TObject);
    procedure bLagiClick(Sender: TObject);
    procedure bProsesClick(Sender: TObject);
    private
    { Private declarations }
    public
    { Public declarations }
    end;

    var
    Form1: TForm1;

    implementation

    {$R *.dfm}

    procedure TForm1.FormCreate(Sender: TObject);
    begin
    bProses.Caption :=’Proses’;
    bLagi.Caption :=’Lagi’;
    bClose.Caption :=’Selesai’;

    bGrade.Caption :=’Grade’;
    bKelulusan.Caption :=’Kelulusan’;

    edit1.Text :=’0′;
    edit2.Text :=’0′;
    end;

    procedure TForm1.bCloseClick(Sender: TObject);
    begin
    close;
    end;

    procedure TForm1.bLagiClick(Sender: TObject);
    begin
    bProses.Caption :=’Proses’;
    bLagi.Caption :=’Lagi’;
    bClose.Caption :=’Selesai’;

    bGrade.Caption :=’Grade’;
    bKelulusan.Caption :=’Kelulusan’;

    edit1.Text :=’0′;
    edit2.Text :=’0′;
    end;

    procedure TForm1.bProsesClick(Sender: TObject);
    var
    NA, hadir : integer;

    begin
    NA :=strtoint(edit1.Text);
    hadir :=strtoint(edit2.Text);

    if NA >=80 then
    bGrade.Caption :=’A’ else
    if NA >=70 then
    bGrade.Caption :=’B’ else
    if NA >=60 then
    bGrade.Caption :=’C’ else
    if NA >=50 then
    bGrade.Caption :=’D’ else
    bGrade.Caption :=’E’;

    if NA =50 then
    bKelulusan.Caption :=’TIDAK LULUS’ else
    bKelulusan.Caption :=’LULUS’;

    if hadir <18 then
    bKelulusan.Caption :='GAGAL' else
    if hadir <=24 then
    bKelulusan.Caption :='LULUS' else
    bKelulusan.Caption :='error';

    if hadir <18 then
    bGrade.Caption :='E' else
    if hadir = 80 then bGrade.Caption :=’A’ else
    if na >= 70 then bGrade.Caption :=’B’ else
    if na >= 60 then bGrade.Caption :=’C’ else
    if na >= 50 then bGrade.Caption :=’D’ else

    bGrade.caption := ‘error’
    end;

    end.

  12. Gelgel Anugrah berkata:

    NIM : c1157201082

    algoritma P6L1

    var
    na, hadir : integer;
    grade, kelulusan : string;

    begin

    if na >=80 then grade = A
    else if na >= 70 then grade = B
    else if na >= 60 then grade = C
    else if na >= 50 then grade = D
    else grade = E

    if grade = D then kelulusan = TIDAK LULUS
    else if grade = E then kelulusan = GAGAL
    else kelulusan = LULUS

    if hadir < 18 then kelulusan = GAGAL
    else if <= 24 then kelulusan = LULUS
    else kelulusan = GAGAL

    if hadir < 18 then grade = E
    else if = 80 then grade = A else
    if na >= 70 then grade = B else
    if na >= 60 then grade = C else
    if na >= 50 then grade = D else
    grade = E

    end

  13. Jefri Suterman berkata:

    c1157201067

    algoritma P6L1

    var
    na, hadir : integer;
    grade, kelulusan : string;

    begin

    if na >=80 then grade = A
    else if na >= 70 then grade = B
    else if na >= 60 then grade = C
    else if na >= 50 then grade = D
    else grade = E

    if grade = D then kelulusan = TIDAK LULUS
    else if grade = E then kelulusan = GAGAL
    else kelulusan = LULUS

    if hadir < 18 then kelulusan = GAGAL
    else if <= 24 then kelulusan = LULUS
    else kelulusan = GAGAL

    if hadir < 18 then grade = E
    else if = 80 then grade = A else
    if na >= 70 then grade = B else
    if na >= 60 then grade = C else
    if na >= 50 then grade = D else
    grade = E

    end

  14. Samuel Sul Seduli berkata:

    NIM: c1157201076

    algoritma P6L1

    var
    na, hadir : integer;
    grade, kelulusan : string;

    begin

    if na >=80 then grade = A
    else if na >= 70 then grade = B
    else if na >= 60 then grade = C
    else if na >= 50 then grade = D
    else grade = E

    if grade = D then kelulusan = TIDAK LULUS
    else if grade = E then kelulusan = GAGAL
    else kelulusan = LULUS

    if hadir < 18 then kelulusan = GAGAL
    else if <= 24 then kelulusan = LULUS
    else kelulusan = GAGAL

    if hadir < 18 then grade = E
    else if = 80 then grade = A else
    if na >= 70 then grade = B else
    if na >= 60 then grade = C else
    if na >= 50 then grade = D else
    grade = E

    end

  15. Yandrie berkata:

    NIM: c1157201073

    algoritma P6L1

    var
    na, hadir : integer;
    grade, kelulusan : string;

    begin

    if na >=80 then grade = A
    else if na >= 70 then grade = B
    else if na >= 60 then grade = C
    else if na >= 50 then grade = D
    else grade = E

    if grade = D then kelulusan = TIDAK LULUS
    else if grade = E then kelulusan = GAGAL
    else kelulusan = LULUS

    if hadir < 18 then kelulusan = GAGAL
    else if <= 24 then kelulusan = LULUS
    else kelulusan = GAGAL

    if hadir < 18 then grade = E
    else if = 80 then grade = A else
    if na >= 70 then grade = B else
    if na >= 60 then grade = C else
    if na >= 50 then grade = D else
    grade = E

    end

  16. Gala berkata:

    NIM: c1157201074

    algoritma P6L1

    var
    na, hadir : integer;
    grade, kelulusan : string;

    begin

    if na >=80 then grade = A
    else if na >= 70 then grade = B
    else if na >= 60 then grade = C
    else if na >= 50 then grade = D
    else grade = E

    if grade = D then kelulusan = TIDAK LULUS
    else if grade = E then kelulusan = GAGAL
    else kelulusan = LULUS

    if hadir < 18 then kelulusan = GAGAL
    else if <= 24 then kelulusan = LULUS
    else kelulusan = GAGAL

    if hadir < 18 then grade = E
    else if = 80 then grade = A else
    if na >= 70 then grade = B else
    if na >= 60 then grade = C else
    if na >= 50 then grade = D else
    grade = E

    end

  17. Resianto berkata:

    c1157201064

    algoritma P6L1

    var
    na, hadir : integer;
    grade, kelulusan : string;

    begin

    if na >=80 then grade = A
    else if na >= 70 then grade = B
    else if na >= 60 then grade = C
    else if na >= 50 then grade = D
    else grade = E

    if grade = D then kelulusan = TIDAK LULUS
    else if grade = E then kelulusan = GAGAL
    else kelulusan = LULUS

    if hadir < 18 then kelulusan = GAGAL
    else if <= 24 then kelulusan = LULUS
    else kelulusan = GAGAL

    if hadir < 18 then grade = E
    else if = 80 then grade = A else
    if na >= 70 then grade = B else
    if na >= 60 then grade = C else
    if na >= 50 then grade = D else
    grade = E

    end

    • Resianto berkata:

      sory pak salah NIM, ini yg benar NIM-nya: c1157201066

      algoritma P6L1

      var
      na, hadir : integer;
      grade, kelulusan : string;

      begin

      if na >=80 then grade = A
      else if na >= 70 then grade = B
      else if na >= 60 then grade = C
      else if na >= 50 then grade = D
      else grade = E

      if grade = D then kelulusan = TIDAK LULUS
      else if grade = E then kelulusan = GAGAL
      else kelulusan = LULUS

      if hadir < 18 then kelulusan = GAGAL
      else if <= 24 then kelulusan = LULUS
      else kelulusan = GAGAL

      if hadir < 18 then grade = E
      else if = 80 then grade = A else
      if na >= 70 then grade = B else
      if na >= 60 then grade = C else
      if na >= 50 then grade = D else
      grade = E

      end

  18. Avif Piranda berkata:

    NIM: c1157201064

    algoritma P6L1

    var
    na, hadir : integer;
    grade, kelulusan : string;

    begin

    if na >=80 then grade = A
    else if na >= 70 then grade = B
    else if na >= 60 then grade = C
    else if na >= 50 then grade = D
    else grade = E

    if grade = D then kelulusan = TIDAK LULUS
    else if grade = E then kelulusan = GAGAL
    else kelulusan = LULUS

    if hadir < 18 then kelulusan = GAGAL
    else if <= 24 then kelulusan = LULUS
    else kelulusan = GAGAL

    if hadir < 18 then grade = E
    else if = 80 then grade = A else
    if na >= 70 then grade = B else
    if na >= 60 then grade = C else
    if na >= 50 then grade = D else
    grade = E

    end

  19. C1157201047 berkata:

    var
    na,kehadiran:Integer;
    begin
    na:=StrToInt(edtna.Text);
    absen:= StrToInt(edtkehadiran.Text);
    If (na > 100) and (kehadiran > 24) then
    begin
    pnlket.Caption := ‘Nilai Maksimal 100′;
    pnlgrade.Caption := ‘Maksimal 24 Kali’;
    end
    else IF (na >= 80) and (kehadiran >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘A’;
    end
    else IF (na >= 70) and (kehadiran >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘B’;
    end
    else IF (na >= 60) and (kehadiran >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘C’;
    end
    else IF (na >= 50) and (kehadiran >= 18) then
    begin
    pnlket.Caption := ‘TIDAK LULUS’;
    pnlgrade.Caption := ‘D’;
    end
    else
    begin
    pnlket.Caption := ‘GAGAL’;
    pnlgrade.Caption := ‘E’;
    end
    end;

  20. C1157201044 berkata:

    var
    na,kehadiran:Integer;
    begin
    na:=StrToInt(edtna.Text);
    absen:= StrToInt(edtkehadiran.Text);
    If (na > 100) and (kehadiran > 24) then
    begin
    pnlket.Caption := ‘Nilai Maksimal 100′;
    pnlgrade.Caption := ‘Maksimal 24 Kali’;
    end
    else IF (na >= 80) and (kehadiran >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘A’;
    end
    else IF (na >= 70) and (kehadiran >= 18) then

    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘B’;
    end
    else IF (na >= 60) and (kehadiran >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘C’;
    end
    else IF (na >= 50) and (kehadiran >= 18) then
    begin
    pnlket.Caption := ‘TIDAK LULUS’;
    pnlgrade.Caption := ‘D’;
    end
    else

    begin
    pnlket.Caption := ‘GAGAL’;
    pnlgrade.Caption := ‘E’;
    end
    end;

  21. C1157201056 berkata:

    Deklarasi

    NA,Hadir:integer

    Deskripsi

    NA=strtoint(edit1)
    Hadir=strtoint(edit2)

    jika NA>=80 maka
    Grade=A
    Jika tidak,jika NA>=70 maka
    Grade=B
    Jika tidak,jika NA>=60 maka
    Grade=C
    Jika tidak,jika NA>=50 maka
    Grade=D
    Jika Tidak=E

    Jika NA =50 maka
    Kelulusan = Tidak Lulus
    Jika Tidak
    Kelulusan = LULUS

    Jika Hadir <18 maka
    Kelulusan = GAGAL
    Jika Hadir <=24 maka
    Kelulusan = LULUS
    Jika Tidak
    Kelulusan = eror

    Jika Hadir <18 maka
    Grade = E
    Jika Tidak
    Jika Hadir =80 maka
    Grade = A
    Jika Tidak,Jika NA >=70 maka
    Grade = B
    Jika Tidak,Jika NA >=60 maka
    Grade = C
    Jika Tidak,Jika NA >=50 maka
    Grade = D
    Jika Tidak
    Grade = eror

  22. C1157201065 berkata:

    Deklarasi

    NA,Hadir:integer

    Deskripsi
    NA=strtoint(edit1)
    Hadir=strtoint(edit2)

    jika NA>=80 maka
    Grade=A
    Jika tidak,jika NA>=70 maka
    Grade=B
    Jika tidak,jika NA>=60 maka
    Grade=C
    Jika tidak,jika NA>=50 maka
    Grade=D
    Jika Tidak=E

    Jika NA =50 maka
    Kelulusan = Tidak Lulus
    Jika Tidak
    Kelulusan = LULUS

    Jika Hadir <18 maka
    Kelulusan = GAGAL
    Jika Hadir <=24 maka
    Kelulusan = LULUS
    Jika Tidak
    Kelulusan = eror

    Jika Hadir <18 maka
    Grade = E
    Jika Tidak
    Jika Hadir =80 maka
    Grade = A
    Jika Tidak,Jika NA >=70 maka
    Grade = B
    Jika Tidak,Jika NA >=60 maka
    Grade = C
    Jika Tidak,Jika NA >=50 maka
    Grade = D
    Jika Tidak
    Grade = eror

  23. C1157201045 berkata:

    var
    na,absen:integer;

    begin
    na:=StrToInt(edtna.Text);
    absen:= StrToInt(edtabsen.Text);

    If (na > 100) and (absen > 24) then
    begin
    pnlket.Caption := ‘Nilai Maksimal 100’;
    pnlgrade.Caption := ‘Maksimal 24 Kali’;
    end
    else IF (na >= 80) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘A’;
    end
    else IF (na >= 70) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘B’;
    end
    else IF (na >= 60) and (absen >= 18) then
    begin
    pnlket.Caption := ‘LULUS’;
    pnlgrade.Caption := ‘C’;
    end
    else IF (na >= 50) and (absen >= 18) then
    begin
    pnlket.Caption := ‘TIDAK LULUS’;
    pnlgrade.Caption := ‘D’;
    end
    else
    begin
    pnlket.Caption := ‘GAGAL’;
    pnlgrade.Caption := ‘E’;
    end
    end;

  24. C1257201147 berkata:

    unit Unit1;

    interface

    uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    Dialogs, ExtCtrls, StdCtrls;

    type
    TForm1 = class(TForm)
    GroupBox1: TGroupBox;
    Button1: TButton;
    nilaii: TEdit;
    hadir: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    grade: TPanel;
    kelulusan: TPanel;
    Button2: TButton;
    Button3: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    private
    { Déclarations privées }
    public
    { Déclarations publiques }
    end;

    var
    Form1: TForm1;
    nilai, kehadiran : integer;

    implementation

    {$R *.dfm}

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    nilai:=strtoint(nilaii.text);
    kehadiran:=strtoint(hadir.Text);
    if nilai >= 80 then
    grade.caption:=’A’
    else if nilai >= 70 then
    grade.Caption:=’B’
    else if nilai >= 60 then
    grade.Caption:=’C’
    else if nilai >= 50 then
    grade.Caption:=’D’
    else
    grade.Caption:=’E’;

    if ((grade.Caption) = ‘A’) or ((grade.Caption) = ‘B’) or ((grade.Caption) = ‘C’) then
    kelulusan.Caption:= ‘LULUS’
    else if (grade.Caption) = ‘D’ then
    kelulusan.Caption := ‘TIDAK LULUS’
    else
    kelulusan.Caption := ‘GAGAL’;

    if kehadiran < 18 then
    grade.Caption:= 'E' ;

    if kehadiran < 18 then
    kelulusan.Caption := 'GAGAL';

    end;

    procedure TForm1.Button2Click(Sender: TObject);
    begin
    close;
    end;

    procedure TForm1.FormCreate(Sender: TObject);
    begin
    nilaii.Text:= '0';
    hadir.Text:= '0';
    end;

    procedure TForm1.Button3Click(Sender: TObject);
    begin
    nilaii.Text:= '0';
    hadir.Text:= '0';
    grade.Caption:= 'Grade';
    kelulusan.Caption:= 'Kelulusan';
    end;

    end.

  25. C1257201146 berkata:

    unit Unit1;

    interface

    uses
    Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
    Dialogs, ExtCtrls, StdCtrls;

    type
    TForm1 = class(TForm)
    GroupBox1: TGroupBox;
    Button1: TButton;
    nilaisaya: TEdit;
    kehadiransaya: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    grade: TPanel;
    kelulusan: TPanel;
    Button2: TButton;
    Button3: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    private
    { Déclarations privées }
    public
    { Déclarations publiques }
    end;

    var
    Form1: TForm1;
    na, hadirsaya : integer;

    implementation

    {$R *.dfm}

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    na:=strtoint(nilaisaya.text);
    hadirsaya:=strtoint(kehadiransaya.Text);
    if na >= 80 then
    grade.caption:=’A’
    else if na >= 70 then
    grade.Caption:=’B’
    else if na >= 60 then
    grade.Caption:=’C’
    else if na >= 50 then
    grade.Caption:=’D’
    else
    grade.Caption:=’E’;

    if ((grade.Caption) = ‘A’) or ((grade.Caption) = ‘B’) or ((grade.Caption) = ‘C’) then
    kelulusan.Caption:= ‘LULUS’
    else if (grade.Caption) = ‘D’ then
    kelulusan.Caption := ‘TIDAK LULUS’
    else
    kelulusan.Caption := ‘GAGAL’;

    if hadirsaya < 18 then
    grade.Caption:= 'E' ;

    if hadirsaya < 18 then
    kelulusan.Caption := 'GAGAL';

    end;

    procedure TForm1.Button2Click(Sender: TObject);
    begin
    close;
    end;

    procedure TForm1.FormCreate(Sender: TObject);
    begin
    nilaisaya.Text:= '0';
    kehadiransaya.Text:= '0';
    end;

    procedure TForm1.Button3Click(Sender: TObject);
    begin
    nilaisaya.Text:= '0';
    kehadiransaya.Text:= '0';
    grade.Caption:= 'Grade';
    kelulusan.Caption:= 'Kelulusan';
    end;

    end.

  26. C1157201080 berkata:

    Var
    NA, hadir : integer

    begin
    Jika hadir=18 maka
    jika NA >=80 maka
    grade ‘A’ jika tidak
    jika NA >=70 maka
    grade ‘B’ jika tidak
    jika NA >=60 maka
    grade ‘C’ jika tidak
    Jika NA >=50 maka
    grade ‘D’ jika tidak
    grade ‘E’ ;

    Jika hadir =18 maka
    jika NA =50 maka
    ‘tidak lulus’ jika tidak
    ‘lulus’

    end;
    End.

  27. C1157201080 berkata:

    Var
    NA, hadir : integer

    begin

    NA :=strtoint
    hadir :=strtoint

    Jika hadir=18 maka
    jika NA >=80 maka
    grade ‘A’ jika tidak
    jika NA >=70 maka
    grade ‘B’ jika tidak
    jika NA >=60 maka
    grade ‘C’ jika tidak
    Jika NA >=50 maka
    grade ‘D’ jika tidak
    grade ‘E’ ;

    Jika hadir =18 maka
    jika NA =50 maka
    ‘tidak lulus’ jika tidak
    ‘lulus’

    end;
    End.

  28. C1157201080 berkata:

    Var
    NA, hadir : integer

    begin

    NA :=strtoint
    hadir :=strtoint

    Jika hadir kurang dari 18 maka
    ‘E’ jika tidak
    jika hadir lebih dari atau sama dgn 18 maka
    jika NA lebih dari=80 maka
    grade ‘A’ jika tidak
    jika NA lebih dari=70 maka
    grade ‘B’ jika tidak
    jika NA lebih dari=60 maka
    grade ‘C’ jika tidak
    Jika NA lebih dari=50 maka
    grade ‘D’ jika tidak
    grade ‘E’ ;

    Jika hadir kurang dari 18 maka
    ‘Gagal’ jika tidak
    jika hadir lebih dari atau sama dgn18 maka
    jika NA <50 Maka
    'gagal' jika tidak
    jika NA lebih dari sama dgn 50 maka
    'tidak lulus' jika tidak
    'lulus'

    end;
    End.

  29. C1157201085 berkata:

    jika NA >=80 maka
    Grade ‘A’ jika tidak,
    Jika NA >=70 maka
    Grade ‘B’ jika tidak
    jika NA >=60 maka
    Grade ‘C’ jika tidak
    jika NA >=50maka
    Grade ‘D’ jika tidak
    grade ‘E’;

    Jika NA >=50 maka
    ‘Tidak Lulus’ jika tidak
    jika NA <50 maka
    'Gagal' jika tidak
    'lulus';

    jika hadir=80 maka
    grade ‘A’ jika tidak
    jika NA >=70 maka
    grade ‘B’ jika tidak
    jika NA >=60 maka
    grade ‘C’ jika tidak
    Jika NA >=50 maka
    grade ‘D’ jika tidak
    grade ‘E’ jika tidak
    Jika hadir <18 maka
    'Gagal' jika tidak
    'erorr';

    jika hadir <=24maka
    jika NA =50 maka
    ‘tidak lulus’ jika tidak
    ‘lulus’
    Jika hadir <18 maka
    'Gagal' jika tidak
    'error'

    end;
    End.

Leave a Reply