C++ Program to Find Area of Semicircle

C++ Program to Find Area of Semicircle

Write C++ Program to Find Area of Semicircle

// CPP Program to Find Area of Semicircle

#include <iostream>
#define PI 3.14

using namespace std;

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

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

	cout << "Area of semicircle having radius " << radius << " is :--> " << area;

	return 0;
}

Output:

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