
#include<stdio.h>
#include<math.h>
void main()
{
int m,n;
float s,l;
float (*q)(int,int);
float area(int a,int b),length(int a,int b);
float f(int a,int b,float (*p)());
scanf("%d%d",&m,&n);
q=area;
s=f(m,n,q);
l=f(m,n,length);
printf("Area of the right triangle is %.2f\n",s);
printf("Length of the hypotenuse is %.2f\n",l);
}
float area(int a,int b)
{
float z;
z=a*b/2;
return z;
}
float length(int a,int b)
{
float z;
z=sqrt(a*a+b*b);
return(z);
}
float f(int a,int b,float (*p)(int,int))
{
float y;
y=(*p)(a,b);
return y;
}