Created
November 9, 2023 17:27
-
-
Save ryu10/f1268e521e2bf0694608b8efc8eeb077 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
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. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run it on:
https://www.onlinegdb.com/online_pascal_compiler