Uses crt;
Var nilai:integer;
Begin
Clrscr;
Write(‘masukan nilai:’);
Readln(nilai);
If(nilai>=80)and(nilai<=100)
Then write(‘nilai anda A’)
Else if(nilai>=70)and(nilai<=79)
Then write(‘nilai anda B’)
Else if(nilai>=60)and(nilai<=69)
Then write(‘nilai anda C’)
Else if(nilai>=50)and(nilai<=59)
Then write(‘nilai anda D’)
Else write(‘nilai anda E’)
Readln;
End.
Soal 2
Uses crt;
Var a,t,NPM:integer;
Nama,kelas:string;
Pil:byte;
Luas:real;
Begin
Clrscr;
Writeln(‘program menu’);
Writeln(‘____________’);
Writeln(‘1.Biodata’);
Writeln(‘2.Luas Segitiga’);
Writeln(‘3.Exit’);
Writeln(‘Masukan Pilihan:’);readln(pil);
Case pil of
1:begin
Clrscr;
Writeln(‘Biodata’);
Writeln(‘Nama:’);readln(nama);
Wriiteln(‘NPM:’);readln(NPM);
Writeln(‘Kelas:’);readln(kelas);
Readln;
End;
2:begin
Writeln(‘program segitiga’);
Clrscr;
Writeln(‘Alas:’);readln(a);
Writeln(‘Tinggi:’);readln(t);
Luas:=1/2*a*t;
Writeln(‘luas:’,luas:5:2);readln;
End,
3:begin
End;
End;
End.
Readln;
End.
Selamat mencoba, semoga berhasil :D
1 comment:
Thanks for share ..
Post a Comment