Rabu, 15 April 2015

Program menghitung Luas Permukaan dan Volume


1. Program Menghitung Volume kubus

Program menghitung_volume_kubus;

Uses wincrt;

var
v,p, l, t:integer;

begin
 
clrscr;

writeln ('mencari volume kubus')  ;

write ('Panjang kubus:'); readln (p);

write ('lebar kubus:');readln (l);

write ('tinggi kubus:');readln(t); 

v:=p*l*t;

writeln('maka volumenya adalah:',v);readln;end.

Minggu, 05 April 2015

Program Tampil Data Turbo Pascal 32 bit

Program Tampil_data;
Uses wincrt;
Var
  n, i, j:integer;
  x:array [1..100] of integer;

Begin
  Write ('Masukkan banyak data ='); readln (n);

  Writeln;

  for i:=1 to n do
  Begin
       Write ('Data ke-',i,'= '); readln (x[i]);
  End;