Senin, 07 Juni 2010

Contoh program for ... to.. do..

Program nama;
Uses wincrt;
Var
x,i,j : integer;
Begin
j := 0;
Readln (x);
For i := 1 to x do
Writeln (i:4, i*i:4);
Readln;
For i := 1 to x do
j := j + i;
Writeln (j);
End.

Tidak ada komentar:

Posting Komentar