- Back to Home »
- membuat tabel pada turbo pascal
Posted by : Niman
Selasa, 01 Mei 2012
program tabel;
uses Wincrt;
Var
i,X,X2,X3 : integer;
SeperX : real;
Begin
Clrscr;
WriteLn('----------------------------');
WriteLn('X X*X X*X*X 1/X');
WriteLn('----------------------------');
For i := 1 To 20 Do {Ulangi sampai 10 kali}
Begin
X := i;
X2 := X*X;
X3 := X*X*X;
seperX := 1/X;
WriteLn(X:3,X2:7,X3:8,SeperX:12:4);
End;
WriteLn('-----------------------------');
End.
uses Wincrt;
Var
i,X,X2,X3 : integer;
SeperX : real;
Begin
Clrscr;
WriteLn('----------------------------');
WriteLn('X X*X X*X*X 1/X');
WriteLn('----------------------------');
For i := 1 To 20 Do {Ulangi sampai 10 kali}
Begin
X := i;
X2 := X*X;
X3 := X*X*X;
seperX := 1/X;
WriteLn(X:3,X2:7,X3:8,SeperX:12:4);
End;
WriteLn('-----------------------------');
End.