Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

program Welcome;

uses
WinCrt; { Allows Writeln, Readln, cursor movement, etc. }

{ WinCrt Demo Program

(Press Ctrl-F9 to run this program.)

This program demonstrates how to use the WinCrt unit


to perform "traditional" screen I/O. This is the easiest
way to build text mode programs that run in a window.
For more information about the WinCrt unit, refer to
Chapter 14 in the Programmer's Guide. For information
on writing more advanced Windows applications, read
about the ObjectWindows application framework in the
Windows Programming Guide. }

Var
x,a,b : integer;
c : real;
Begin
Writeln ('***************************************');
writeln ('

menghitung nilai x2, x3, 1/x ');

writeln ('***************************************');
writeln ('nilai x

x^2

x^3

1/x');

writeln ('***************************************');
For x := 1 to 10 do
begin

a := x*x;
b := x*x*x;
c := 1/x;
writeln (x:4, a:8, b:9, c:18);
end;
writeln ('***************************************');
end.

program pengulangan;

uses WinCrt;

Var
I, J : integer;
Begin
For I :=1 to 5 do
begin
For J :=1 to 3 do
Write (I:2, J:10);
writeln;
end;
End.

You might also like