program nilai dalam pascal

program nilai;

uses wincrt;

const a=0.4;

b=0.6;

var

nim:real;

nama:string;

d,e,f:real;

pilih:char;

begin

REPEAT

CLRSCR;

write(‘masukkan nama= ‘);readln(nama);

write(‘masukkan nim= ‘);readln(nim);

write(‘nilai UTS= ‘);readln(d);

write(‘nilai UAS= ‘);readln(e);

f:=a*d+b*e;

writeln(‘nilai akhir adalah= ‘,f:5:2);

if f<50 then writeln(‘gagal’) else writeln(‘lulus’);

write(‘apakah ingin mengulang lagi(Y/T)?’);readln(pilih);

until pilih=’t’;

write(‘selesai’);

end.

Program Tukar;

uses wincrt;

var

a,b:Integer;

Begin

write(‘a:’);

readln(a);

write(‘b:’);

readln(b);

writeln(‘a:’,b);

writeln(‘b:’,a);

end.

Iklan

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 )

Foto Google+

You are commenting using your Google+ 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 )

w

Connecting to %s

%d blogger menyukai ini: