Powered By Blogger

Jumat, 28 Maret 2014

Contoh OCtav

%File Name:coba_5.m
n=201;
delx=12/(n-1);
for k=1:n
x(k)=(k-1)*delx;
y(k)=sin(x(k))*exp(-0.4*x(k));
end
%plot(x,y)
plot(x,y,'linewidth',4)
title(' MENU SAYA')

Minggu, 04 November 2012

artis papan atas.....?????

 masa rmaja gituloooooooo,,,,,,,,,,,,,,,,,??????????????????????



         Berbagi ilmu ,,,,,,,,,????????????????????bagi anda pengen program .,,,,  disini  lah tempat nya..,,,,,,,//???????????????


program prosedur;
uses wincrt;

writeln('====================');var
i:integer;

procedure garis;
begin
end;

procedure data;
var
nm:string;
npm:integer;
almt:string;
begin
write('Nama:');readln (nm);
write('NPM:');readln (npm);
write('Alamat:');readln(almt);
end;

begin
for i:=1 to 5 do
begin
writeln('Data-data Mahasiswa');
garis;
data;
end;
end.


program latihan_prosedur;
uses wincrt;
var
i:integer;
k:byte;

procedure garis;
begin
writeln('=====================');
end;

procedure luas_persegi_panjang;
var
p:integer;
l:integer;
hasil:integer;
begin
write('Panjang:');readln(p);
write('Lebar');readln(l);
hasil:=p*l;
writeln ('luas persegi panjang:',hasil);
end;

    procedure luas_segitiga;
    var
    A:real;
    T:integer;
    luas:real;

    begin
    write('Alas:');readln(A);
    write('Tinggi:');readln(T);
    luas:=(A*T)/2;
    writeln('Hasil:',luas:0:2);
    end;

procedure keliling_lingkaran;
var
r,kel:real;

const
phi=3.14;


begin
write('R:');readln(r);
kel:=2 * r * phi;
writeln('Keliling_lingkaran:',kel:0:2);
end;


begin
for i:= 1 to 5 do
begin
writeln;
writeln ('pilih rumus yang dininginkan');
writeln ('1.luas_persegi_panjang');
writeln ('2.luas_segitiga');
writeln ('3.Keliling_lingkaran');
write ('masukkan no pilihan (1,2,3) pilih salah satu:');readln(k);

case k of
1:luas_persegi_panjang;
2:luas_segitiga;
3:keliling_lingkaran;

end;
end;
end.




brooooooooo,,,,,,,,,,,,,,,,,,??????????????????

jangan slah semen pdang jjuga seperti ini loooooo,,,,,??????????????????????

mowwwwww taw ceritanyaaaaa,,,,,!!!!!!!!!!!!!!!!!!!!!



                          telusuriii alamat iniiii,,,,,,,,,,,,,,,,,,,,,,
http://kurniawanapl.blogspot.com
jangan lupa yaaaaaaaaaaaaaaaaa,,,,!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!