Laman

Selasa, 22 Mei 2012

Contoh Program Paskal Pengaplikasian For downto do

uses crt;
var a,b : integer;
begin
clrscr;
a:= 5;
for b:= a downto 1 do
begin
if b=1 then write(b*b,'=') else write (b*b,'+'); end;
write(a*11);
readln; end.



Hasil:

25+16+9+4+1=55


Sumber : Pra UTS ATA 2011//2012 Algoritma & Pemprograman 2

Tidak ada komentar:

Posting Komentar