Senin, 07 Mei 2012

Program Pascal Repeat..Until

Hadeh.... Udah lama yah ga ketemu... sesuai janji saya mau share ilmu saya pada kalian semua....

Langsung aja yah soalnya saya lagi sibuk jadi GM RF Demage Full PvP 2.2.3

Nieh Source Code nya...

uses crt;
{ program KRS sederhana dalam dua versi bahasa}
var total,IP:real;
sks,x:integer;
mk:string;
begin
writeln (‘ SELAMAT DATANG DALAM PENGISIAN KRS ‘);
writeln (‘ 1. dalam versi bahasa jawa’);
writeln (‘ 2. dalam versi bahasa indonesia’);
write (‘pilih versi = ‘);read (x);
if (x= 1) then
begin
write (‘lebokno nilai IP semestermu = ‘); readln (IP);
total:= 0;
if (IP < =1.2)then
begin
write ('kowe nduwe jatah sks = 12');
repeat
begin
write (' lebokno mata kuliah seng arep mbok jipuk = ');readln (mk);
write (' lebokno sks mata kuliah seng mbok jipuk = '); readln (sks);
total:= total+sks
end;
until (total =12);
write (' jatah sks mu wis entek');
end;
if ( IP <= 2) then
begin
writeln ('kowe nduwe jatah sks = 21');
repeat
begin
write (' lebokno mata kuliah seng arep mbok jipuk = ');readln (mk);
write ('lebokno sks mata kuliah seng mbok jipuk = ');readln (sks);
total:= total + sks
end;
until ( total= 21);
write ('jatah sksmu wis entek');
end;
if ( IP >= 3 ) then
begin
writeln (‘ kowe nduwe jatah sks = 24′);
repeat
begin
write (‘lebokno mata kuliah seng arep mbok jipuk = ‘);readln (mk);
write (‘lebokno sks mata kuliah seng mbok jipuk = ‘);readln (sks);
total:= total + sks
end;
until (total = 24);
write (‘jatah sksmu wis entek’);
end;
if ( IP < 3) then
begin
writeln ('kowe nduwe jatah sks = 22');
repeat
begin
write (' lebokno mata kuliah seng arep mbok jipuk = ');readln (mk);
write (' lebokno sks mata kuliah seng mbok jipuk = ');readln (sks);
total:=total + sks
end;
until (total = 22);
write ('jatah sksmu wos entek');
end;
end;
if (x = 2) then
begin
write ('masukan nilai IP semester = '); readln (IP);
total:= 0;
if ( IP <= 2) then
begin
writeln ('anda mempunyai jatah sks = 21');
repeat
begin
write (' input mata kuliah yang akan anda ambil = ');readln (mk);
write ('input sks mata kuliah yang anda ambil = ');readln (sks);
total:= total + sks
end;
until ( total= 21);
write ('jatah sks anda sudah habis');
end;
if ( IP >= 3 ) then
begin
writeln (‘ anda mempunyai jatah sks = 24′);
repeat
begin
write (‘input mata kuliah yang akan anda ambil= ‘);readln (mk);
write (‘input sks mata kuliah yang anda ambil= ‘);readln (sks);
total:= total + sks
end;
until (total = 24);
write (‘jatah sks anda sudah habis’);
end;
if ( IP < 3) then
begin
writeln (‘anda mempunyai jatah sks = 22′);
repeat
begin
write (‘ input mata kuliah yang akan anda ambil = ‘);readln (mk);
write (‘ input sks mata kuliah yang anda ambil = ‘);readln (sks);
total:=total + sks
end;
until (total = 22);
write (‘jatah sks anda sudah habis’);
end;
end;
end.

Semoga Bermanfaat yah.... >.<

Program Pascal Repeat..Until Rating: 4.5 Diposkan Oleh: Unknown

0 komentar:

Posting Komentar

Translate