I need to find the area of the pythagorean triple, it will take x,y,z as sides o
ID: 3624065 • Letter: I
Question
I need to find the area of the pythagorean triple, it will take x,y,z as sides of a triangle and will return an Area. and if the triangle is a right triangle it has to return -9999.99.using the switch command for example the area for the trapezoid
/************************ .h file ********************************/
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
double WhatsTheArea(double x, double y, double z,char A)
{
int a, b, c;
double s;
switch( A )
{
case 'Z':
return ((x+y)/2)*z;
break;
}
}
/******************** .cpp file *******************************/
#include "stdafx.h
#include "/**** .h file*****/"
int main()
{
cout << " The Area of an Trapezoid = " << WhatsTheArea(4,5,6,'Z');
return 0;
}