###### Advertisements

###### Advertisements

Short Note

Write the specification of an algorithm hypotenuse whose inputs are the lengths of the two shorter sides of a right-angled triangle, and the output is the length of the third side.

###### Advertisements

#### Solution

- hypotenuse (a, b)
- – – inputs: a, b are real numbers, a > 0, b > 0
- – – outputs: c
^{2}= a^{2}+ b^{2}wrhere c is real number, c > 0

Concept: Algorithm Design Techniques

Is there an error in this question or solution?

#### APPEARS IN

#### RELATED QUESTIONS

Omitting details inessential to the task and representing only the essential features of the task is known as ______

Exchange the contents: Given two glasses marked A and B. Glass A is full of apple drink and glass B is full of grape drink. For exchanging the contents of glasses A and B, represent the state by suitable variables, and write the specification of the algorithm.