- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP

- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who

# Program to calculate the area of an Circle inscribed in a Square

A circle inscribed in a square is a circle which touches the sides of the circle at its ends. I.e. the diameter of the inscribed circle is equal to the side of the square. The area can be calculated using the formula *“((丌/4)*a*a)”* where ‘a’ is the length of side of square.

**Logic of the Code** - The area of circle inscribed inside the circle is calculated using the formula *((丌/4)*a*a)* for this we need to define the value of pie (丌) that mathematically is 22/7 or 3.14. The expression that evaluates to the result is saved in a float variable.

## Example

#include <stdio.h> #include <math.h> int main() { int a = 5; float area; float pie = 3.14; printf("Program to find area of circle inscribed inside a square\n"); printf("The side of the square is %d \n", a); area = ((pie/4)*a*a); printf("The area of circle inscribed inside a square is %f \n", area); return 0; }

## Output

The side of the square is 5 The area of circle inscribed inside a square is 19.625000

- Related Questions & Answers
- Area of a square inscribed in a circle which is inscribed in an equilateral triangle in C Program?
- Area of a square inscribed in a circle which is inscribed in an equilateral triangle in C Program?
- Area of a square inscribed in a circle which is inscribed in a hexagon in C Program?
- C Program for Area of a square inscribed in a circle which is inscribed in a hexagon?
- Area of decagon inscribed within the circle in C Program?
- Area of circle inscribed within rhombus?
- Area of circle inscribed within rhombus in C Program?
- C Program for area of decagon inscribed within the circle?
- Area of a circle inscribed in a regular hexagon?
- Area of circle which is inscribed in an equilateral triangle?
- Area of a circle inscribed in a rectangle which is inscribed in a semicircle?
- Area of a Circumscribed Circle of a Square in C++
- Area of circle which is inscribed in equilateral triangle in C Program?
- Area of a circle inscribed in a rectangle which is inscribed in a semicircle in C?
- Find the area of largest circle inscribed in ellipse in C++

Advertisements