kode 1:
program gay;kode 2:
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.
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.
Tag :
Pascal,
Programming
0 Komentar untuk "Membuat simbol nazi dengan pascal "