![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Area of a square inscribed in a circle which is inscribed in an equilateral triangle in C Program?
The program to find the area of a square inscribed in a circle which itself is inscribed in an equilateral triangle. The radius of circle inscribed inside an equilateral is a/(2√3).
The diameter of circle is the diagonal of square, d = 2 * r = a/ √3
Area formula for area of square given its diagonals is ½ d2,
A = 0.5 * d2 A = (1/2) * (a2) / (3) = (a2/6)
Example
#include <iostream> using namespace std; int main() { float area,a = 10; area = (a*a) / 6; cout <<"area = "<<area<< endl; return 0; }
Output
area = 16.6667
Advertisements