Berbagi Artikel-Artikel Unik Dan Bermutu

Blog Archive

Copyright © 2015 Artikel TopNews | . Powered by Blogger.

Labels

ads3

tag

Top Artikel

ads2

ads

iklan

Membuat simbol nazi dengan pascal

kode 1:
program gay;
var
a,b,c:integer;
d,e:integer;
begin
write('input ');
readln(a);
d:=a div 2;
e:=d+1;
for b:=1 to a do
begin
for c:=1 to a do
begin
if b=1 then
begin
if c<=e then write('*')
else if c>e then if c < a then write(' ')
else write('*');
end
else if b>1 then if b<e then
begin
if c<=d then write(' ')
else if c=e then write('*')
else if c>e then if c < a then write(' ')
else write('*');

end
else if b=e then write('*')
else
begin
if c=1 then write('*')
else if c>1 then if c<=d then write(' ')
else if c>1 then if c=e then write('*')
else if b=a then if c>e then write('*');
end;
end;
writeln;
end;

end.
kode 2:

program gay;
var
a,b,c:integer;
d,e:integer;
begin
write('input ');
readln(a);
d:=a div 2;
e:=d+1;
for b:=1 to a do
begin
for c:=1 to a do
begin
if b=1 then
begin
if c=1 then write('*')
else if c<=d then write(' ')
else write('*');
end
else if b>1 then if b<e then
begin
if c=1 then write('*')
else if c<=d then write(' ')
else if c=e then write('*');

end
else if b=e then write('*')
else if b=a then
begin
if c<=e then write('*')
else if c>e then if c<a then write(' ')
else write('*');
end
else
begin
if c<=d then write(' ')
else if c=e then write('*')
else if c>e then if c<a then write(' ')
else if c=a then write('*');
end;
end;
writeln;
end;

end.
0 Komentar untuk "Membuat simbol nazi dengan pascal "
Back To Top