Skip to content

Instantly share code, notes, and snippets.

@ryu10
Created November 9, 2023 17:27
Show Gist options
  • Save ryu10/f1268e521e2bf0694608b8efc8eeb077 to your computer and use it in GitHub Desktop.
Save ryu10/f1268e521e2bf0694608b8efc8eeb077 to your computer and use it in GitHub Desktop.
{
Online Pascal Compiler.Code, Compile,
Run and Debug Pascal program online.Write your code in this editor and
press "Run" button to execute it.}
program asciiart;
var
x, y, i, i2, flag:integer;
a, b, ca, cb, t:real;
begin
for y := -12 to 12 do
begin
for x := -39 to 39 do
begin
ca:= x * 0.0458;
cb:= y * 0.08333;
a:= ca;
b:= cb;
for i := 0 to 15 do
begin
t:= a * a - b * b + ca;
b:= 2 * a * b + cb;
flag:= 0;
a:= t; {*}
if a * a + b * b > 4 then
begin
flag:= 1;
i2:= i; {*}
break {*i:= 15-- turbo pascal}
end; {*}
end; {*}
if flag = 0 then
Write (' ')
else
begin
if i2 >9 then
i2:= i2 + 7; {*}
Write (chr (48 + i2)) {*}
end;
end;
Writeln (' ');
end;
end.
@ryu10
Copy link
Author

ryu10 commented Nov 9, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment