Tuesday, May 3, 2011

Program Array

Uses Wincrt;
Var x   : array [1..100] of integer;
    n,i :integer;
Begin
  Writeln('Program Array');
  Writeln('=============');
  Writeln;
  Write('Masukkan Jumlah Data: ');readln(n);
  Writeln;
  For i:= 1 to n do
    Readln(x[i]);
  Writeln;
  Write('Data Yang Telah Dimasukkan: ');
  For i:= 1 to n do
    Write(x[i],'   ');
End.

Outputnya:

0 comments:

Post a Comment