Given a radius of a circle, draw the circle without using floating point arithmetic.
Following program uses a simple concept. Let the radius of the circle be r. Consider a square of size (2r+1)*(2r+1) around the circle to be drawn. Now walk through every point inside the square. For every every point (x,y), if (x, y) lies inside the circle (or x^2+ y^2 < r^2), then print it, otherwise print space.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
- sizeof() for Floating Constant in C
- A subtle guide to get that college internship
- Chatbot Theory Explained !
- Sudo Placement 2 | Course Structure
- How to prepare for AMCAT?
- How to attempt Function Coding Questions?
- Service-Oriented Architecture
- Editors and Its types in System Programming
- File globbing in Linux
- Functional Dependency and Attribute Closure
- GATE CS 2016 Syllabus
- MAQ Software most Frequently Asked Questions
- Amazon’s most frequently asked interview questions | Set 2
- What's the difference between Scripting and Programming Languages?