Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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
Server Side Programming Articles - Page 2209 of 2650
227 Views
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/2Since, the diagonal of square is equal to diameter of the circle, so the relation between the radius and side is, a=√rBased on the side of hexagon, a = √3A/√2So, Area of the Square, Area=a2 = (√3A/√2)2Example#include #include int main() { ... Read More
342 Views
For understanding this complex problem, let's do it in two parts. First we will find the dimensions of the rectangle and based on that we can find the area of a triangle inscribed in it.Using the equation of ellipse and differential calculus, mathematical formula for the area of a rectangle is, area = 2ab, where 2a = major axis and 2b = minor axis.The largest triangle that can be inscribed in the rectangle, should stand on the same base & has height raising between the same parallel sides of the rectangle.The area of largest triangle inscribed within the rectangle is ... Read More
305 Views
A regular decagon is a ten sided polygon with all sides and angles equal. And here we need to find the area of a decagon that is inscribed inside a circle using the radius of the circle r, Mathematical formula for the side of the decagon inscribed in the circle, a = r√(2-2cos36o)(Using cosine rules)Formula for finding area of decagon, Area = 5*a2*(√5+2√5)/2 Area = 5 *(r√(2-2cos36))^2*(√5+2√5)/2 Area = (5r2*(3-√5)*(√5+2√5))/4Using this formula in a program, Example#include #include int main() { float r = 8; float area = (5 * pow(r, 2) * (3 - sqrt(5))* (sqrt(5) ... Read More
1K+ Views
A Hexagon is a closed figure of 6 side and a regular hexagon is the one which has all six sides equal and angle equal. For finding the area of hexagon, we are given only the length of its diagonal i.e d.The interior angles of Hexagon are of 120 degrees each and the sum of all angles of a Hexagon is 720 degrees.The formula to find the area of hexagon with side length a, Area = (3a2 √3) / 2.Since all sides are of same size and angle is 120 degrees, d = 2a or a = d/2By putting the ... Read More
214 Views
An n-sided regular polygon inscribed in a circle, the radius of this circle is given by the formula, r = a/(2*tan(180/n))Suppose a polygon have 6 faces i.e., a hexagon and as we know mathematically that the angle is 30 degreeSo the radius of circle will be (a / (2*tan(30)))Therefore, r = a√3/2We see the polygon can be divided into N equal triangles. Looking into one of the triangles, we see that the whole angle at the center can be divided into = 360/NSo, angle x = 180/n Now, tan(x) = (a / 2) * r So, r = a / ... Read More
2K+ Views
To find the area of a circle inside a right angled triangle, we have the formula to find the radius of the right angled triangle, r = ( P + B – H ) / 2.Given the P, B and H are the perpendicular, base and hypotenuse respectively of a right angled triangle.Area of a circle is given by the formula, Area = π*r2where π = 22 / 7 or 3.14 and r is the radius of the circle.Hence the area of the incircle will be given by the formula, Area = π* ((P + B – H) / 2)2.Example#include ... Read More
764 Views
Task is to print the given after the specified character occurrence for given number of times which is specified by the userInput : string = {“I am harsh vaid “} Char =’a’ Count =2 Output : rsh vaidIt means user specified character ‘a’ and its occurrence 2 so the output string should be displayed after two occurrences of a.AlgorithmSTART Step 1 -> input character in ch(e.g. ‘a’) and count(e.g. 2) as int Step 2 -> declare and initialize n with size of a string by sizeof(string)/sizeof(string[0]) Step 3 - > Loop For i to 0 and i 0 ... Read More
176 Views
Given array with set of elements and the task is to find out set with exactly three elements having sum less than or equals to k.Input − arr[]= {1, 2, 3, 8, 5, 4}Output − set → {1, 2, 3} {1, 2, 5} {1, 2, 4} {1, 3, 5} {1, 3, 4} {1, 5, 4} {2, 3, 5} {2, 3, 4}In this, first task is to calculate the size of array depending upon which for loop of i is iterated till size-2 and for loop of j is iterated till size-1 and for loop of k is iterated till sizeAlgorithSTART Step 1 ... Read More
1K+ Views
Given a sentence and the challenge is to find the longest palindrome from the given sentenceWhat is a Palindrome?Palindrome is a word or sequence whose meaning remains same even after reversing the stringExample − Nitin, after reversing the string its meaning remains the same.Challenge is to find the longest palindrome from the given sentence.Like sentence is: malayalam liemadameil ijiIt contains three palindrome words but the longest is − liemadameilAlgorithmSTART STEP 1 -> Declare start variables I, j, k, l, max to 0, index to -1, check to 0, count to 0 Step 2 -> Loop For i to 0 and ... Read More