C Program to Find Area of Semicircle

Write C Program to Find an Area of the Semicircle

//Write a C Program to Find Area of Semicircle

#include <stdio.h>
#define PI 3.14

int main()
{
    float radius = 3, area;

    // Formula to Find Area of Semicircle
	area = (PI * radius * radius) / 2 ;

	printf("Area of semicircle having radius %0.2f is :--> %0.2f", radius, area);

	return 0;
}

Output:

Area of semicircle having radius 3.00 is :--> 14.13

≪ Previous | Next ≫