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.
<span>A return statement causes a value to be sent from a called method back to the calling method.
</span>When used in computer programming the return statement causes execution to leave the current subroutine and resume at the return address, where the term return address denotes the point <span>in the code immediately after where the subroutine was called.</span>
Answer:
Explanation:
Operation Address Hit? Read Value
Read 0x834 No Unknown
Write 0x836 Yes (not applicable)
Read 0xFFD Yes CO