Menu Close

Find the area of the pyramid

Jannu and Preethi both went to Egypt for visiting Pyramids. On seeing the Pyramids they were in discussion.  During the discussion Jannu asked Preethi, what will be the area of this Pyramid. Preethi have no idea about it. 

Can you help Preethi in calculating the area of this Pyramid?
Functional Description:
Area = ( height * base )/2 

Input:
Input has two floating point values representing height and base.

Output:
Prints the area of the pyramid with only three values after decimal point.
#include <stdio.h>
int main()
{
    float base,height,area;
    scanf("%f %f",&height,&base);
    area=(height*base)/2;
    printf("%.3f",area);
    return 0;
}

INPUT_1:
31.5  43.7

OUTPUT:
688.275


INPUT_2:
176.3  120.6

OUTPUT:
10630.890


INPUT_3:
20.6  50.2

OUTPUT:
517.060


INPUT_4:
30.2  60.5

OUTPUT:
913.550



Morae Q!