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
- Why learning C Programming is a must?
- Step by Step guide to Write your own WordPress Template
- Structured Programming Approach with Advantages and Disadvantages
- HQL | Introduction
- Print all subsequences of a string using ArrayList
- How to prepare for AMCAT?
- How to attempt Function Coding Questions?
- 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
- What's the difference between Scripting and Programming Languages?
Improved By : jit_t