r/ProgrammerHumor • • 5d ago

Meme technicallyCorrect

Post image
1.6k Upvotes

51 comments sorted by

View all comments

Show parent comment

19

u/Impossible_Dog_7262 4d ago edited 4d ago

if: x == 0 || y == 0 || x == y || x == (width -y)||x == width|| y == height:
print("x")
else:
print(" ")
}
printLn("")

I feel like being able to program a diagonal in a nested for loop isn't that difficult.

10

u/StaticCoder 4d ago

Except it's not a diagonal

7

u/Impossible_Dog_7262 4d ago

Ah... I had missed the two wide center. That increases the amount of lines from 6 to 8, yeah...