- Related Questions & Answers
- C Program for Tower of Hanoi
- C++ Program for Dijkstra’s shortest path algorithm?
- C/C++ Program for nth Catalan Number?
- C Program to Multiply two Floating Point Numbers?
- C program to find the length of a string?
- C Program to Check if all digits of a number divide it
- C Program to Check if a Given String is a Palindrome?
- Write a program to Delete a Tree in C programming
- Write a C program to print “ Tutorials Point ” without using a semicolon
- Surface Area and Volume of Hexagonal Prism in C programming
- Sum of the nodes of a Singly Linked List in C Program
- Sum of first n natural numbers in C Program
- C Program for simple interest?
- Area of a n-sided regular polygon with given Radius in C Program?
- Area of a leaf inside a square in C Program?

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

Given, A square that is inscribed within a circle that is inscribed in a regular hexagon and we need to find the area of the square, for that we need to find the relation of the side of square and the side of the hexagon.

The mathematical formula for the radius of circle inscribed within the hexagon is, r=A√3/2

Since, the diagonal of square is equal to diameter of the circle, so the relation between the radius and side is, a=√r

Based on the side of hexagon,

a = √3A/√2

So, Area of the Square, Area=a^{2} = (√3A/√2)^{2}

#include <stdio.h> #include <math.h> int main() { float a = 5; float area = pow((a * sqrt(3)) / (sqrt(2)), 2); printf("area = %f", area); return 0; }

area = 37.500000

Advertisements