Y’all just asking for people do your work, literally not even a question
Answer: The following code is in c++
#include <iostream>
#include<math.h>
using namespace std;
int main()
{
float a,b,c;
cout<<"Enter height and base of triangle\n";
cin>>a>>b; //reading two sides from user
c=sqrt(pow(a,2)+pow(b,2)); //calculating hypotenuse
cout<<"Length of hypotenuse is "<<c; //printing third side of triangle
return 0;
}
OUTPUT :
Enter height and base of triangle
3
4
Length of hypotenuse is 5
Explanation:
In the above code, three variables a, b and c of int type are declared. After that, it is asked from user to enter the value of a and b. The user puts the value and then c is calculated with the help of Pythagoras theorem formulae which squares the values of two sides and then adds them to calculate hypotenuse of a right angled triangle and finally c is printed to console.
Answer:
3 parameters are passed into the function.
1 value will be returned from the function.
Explanation:
From the function definition "function sum(first, second, third)", we can see that there are three value/parameters are passed in the function.Then variable "result" will be the sum all the three values. After that it will print the all three values in new line. Then the function will return one value which is the sum of all three that is value of "result".As there is only one value returned by the return statement in the function.