C
chump1708
Can anyone give me an idea for drawing a circle without making use of
any floating point computations?
Thanks
Prasad
any floating point computations?
Thanks
Prasad
Can anyone give me an idea for drawing a circle without making use of
any floating point computations?
Thanks
Prasad
[email protected] said:Can anyone give me an idea for drawing a circle without making
use of any floating point computations?
Can anyone give me an idea for drawing a
circle without making use of any floating
point computations?
Can anyone give me an idea for drawing a circle without making use of
any floating point computations?
Can anyone give me an idea for drawing a circle without making use of
any floating point computations?
Thanks
Prasad
Vladimir said:If you try to implement this in C, and have questions, you can always
come back here.
Can anyone give me an idea for drawing a circle without making use of
any floating point computations?
Thanks
Prasad
tedu said:this C program draws one circle without any fp:
#include <stdio.h>
int main(int argc, char **argv) {
printf("o\n");
Googmeister said:Here's the LOGO / differential geometry solution:
repeat
go forward 1 unit
turn right 1 unit
Vladimir said:This program is not correct C:
return 0;
Also I was not the OP.
tedu said:i was hoping the on-topic requirements here were loose enough to
squeeze a little c99 into the group.
that post isn't visible to me, which is why i quoted the original
author as well.
Can anyone give me an idea for drawing a circle without making use of
any floating point computations?
Thanks
Prasad
Default User said:Why? That seems a fairly useless thing to do.
32 seconds with Google returned this excellent page:
http://www.cs.unc.edu/~mcmillan/comp136/Lecture7/circle.html
Can anyone give me an idea for drawing a circle without making use of
any floating point computations?
Solution #1:
------------
#include <stdio.h>
int main(void)
{
putchar('O');
}
Jordan Abel said:You need to also output a newline, otherwise the output might never
show. In particular, my system's interactive shell prints a carriage
return and overwrites an unterminated last line of output with its
prompt. Other systems may not flush an unterminated last line to the
output device at all.
tedu said:this C program draws one circle without any fp:
#include <stdio.h>
int main(int argc, char **argv) {
printf("o\n");
}
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.