Program to find the area and perimeter of the semicircleIn this article, we will discuss the program to find the area and perimeter of semicircle in different programming languages. But before writing the programs, let's first see a brief description of the semicircle and the formulae to find its area and perimeter. SemicircleWhen a line passes through the center and touches the two ends of the circle, then a semicircle is formed. The diameter of a circle divides it into two halves that are referred to as semicircles. A semicircle is the half part of a circle. Area of semicircleThe area of semicircle is equal to half of the area of a circle. When we divide the area of a circle by 2, we will get the area of the semicircle. The area of a circle is πr^{2}. So, the area of semicircle will be  Area of semicircle =1/2( πr^{2}) The perimeter of a semicircle is equivalent to the sum of diameter and half of the circumference of a circle. The formula for perimeter of the circle can be πd or 2πr (where 'd' is diameter and 'r' is the radius). So, the formula to calculate the perimeter of a semicircle is  Now, let's see the programs to find the area and perimeter of the semicircle. Programs to find the area and perimeter of the semicircleIn the programs, we are using the formulae given below  Program: Write a program to find the area and perimeter of semicircle in C language. Output: Program: Write a program to find the area and perimeter of semicircle in C++ language. Output: Program: Write a program to find the area and perimeter of semicircle in python language. Output: After the execution of the above code, and after entering the value of the radius, the output will be  Program: Write a program to find the area and perimeter of semicircle in Java. Output: Program: Write a program to find the area and perimeter of semicircle in JavaScript. Output: After the execution of the above code, the output will be  After entering the value and clicking on OK, the output will be  Program: Write a program to find the area and perimeter of semicircle in C#. Output: Program: Write a program to find the area and perimeter of semicircle in PHP. Output: So, that's all about the article. Here, we have discussed the programs to find the area and perimeter of semicircle in C, C++, Java, C#, PHP, python, and JavaScript. Hope you find the article helpful and informative.
Next TopicPrograms List
