#include <stdio.h>
#define pi 3.141592653
    float calculateVolume(float r,float h)
{
    float vol = ((pi*h*h)*((3*r)-h)/3);
    return vol;
}


int main()
{
    float r;
    float h;
    float vol;
    printf("Please enter Radius of reservoir R(m):\n");
    scanf("%f",&r);
    printf("Please enter water depth h(m):\n");
    scanf("%f", &h);
    vol = calculateVolume(r,h);
    printf("For a reservoir of Radius %f m,\n", r);
    printf("and a water depth %f m,\n", h);
    printf(" the volume of water is %f m^3.\n", vol);
    return 0;
}
