[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Daily Programming Challenge

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 16
Thread images: 4

File: akari!!.jpg (83KB, 575x720px) Image search: [Google]
akari!!.jpg
83KB, 575x720px
In any language, write a program that will draw a circle of arbitrary size in the terminal!

Since most terminals fonts are not 1:1, your circle might look like this:
./circle 10
#####
# #
# #
# #
# #
# #
# #
# #
#####

You can cheat and make your circle look nicer by dividing your x values by 2.
./circle 10
#####
## ##
# #
## ##
#####
>>
>>59498089
on it
>>
>>59498089
>./circle 10
> #####
> ## ##
> # #
> ## ##
> #####


That's circle 20, isn't it?
>>
>>59498089
what is 10? the radius?
>>
>>59498382
From what I understand it's the half of the perimeter
>>
File: circle.png (10KB, 981x513px) Image search: [Google]
circle.png
10KB, 981x513px
>>59498402
too late, i ain't rewriting it
>>
>>59498089
>>59498264
>>59498706
thats not a circle
>>
File: circle2.png (10KB, 540x268px) Image search: [Google]
circle2.png
10KB, 540x268px
>>59498723
it is, it's just that the y axis on the grid is stretched because of the font. The x/y values are accurate to a circle though.
>>
>>59498779
no its not looks like a oval
>>
>>59498807
you're right, you win. well done. now pls go.
>>
>>59498723
Drawing a circle is nearly impossible
>>
>>59498850
yeah this
>>
>>59498264
No, it's a circle 10.

You can just ignore rows of pixels with no points.
>>
>>59498089
post more akari, she makes me want to complete the challenge!
>>
What do I win?
>>
File: 1468785949982.jpg (550KB, 839x821px) Image search: [Google]
1468785949982.jpg
550KB, 839x821px
>>59499748
you can do it anon!
Thread posts: 16
Thread images: 4


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.