Cyberprotol Indonesia

Pusat informasi dunia cyber dan teknologi
Follow Me

program menampilkan bintang bentuk persegi



By  Firman Arifin     1/03/2011 08:46:00 AM     
program bintang_persegi;

uses wincrt;

var n, a, b, c : integer;

begin
      clrscr;
      write ('Masukkan angka : ');readln(n);

      for a := 1 to n do
      begin
            write ('*');
      end;

      writeln;
      for b := 2 to n-1 do
      begin
            write ('*');
            for c := 1 to n-2 do
            begin
                  write (' ');
            end;

            write ('*');
            writeln;
      end;

      for a := 1 to n do
      begin
            write ('*');
      end;

      readln;
end.



layout 


About Firman Arifin

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas euismod diam at commodo sagittis. Nam id molestie velit. Nunc id nisl tristique, dapibus tellus quis, dictum metus. Pellentesque id imperdiet est.

No comments:

Post a Comment

Silahkan masukkan komentar sobat, komentar sobat sangat berarti buat saya


Contact Form

Name

Email *

Message *

Labels

Translate