题目描述

Define a function hypotenuse that calculates the hypotenuse of a right triangle when the other two sides are given. The function should take two double arguments and return the hypotenuse as a double. Use this function in a program to determine the hypotenuse for each of the triangles shown below.


输入格式

Take side1 and side2 as input and end at -1.


输出格式

cout << setprecision(1) << fixed;


样例数据

输入

3 4
5 12
8 15
-1

输出

5.0
13.0
17.0

备注


操作

评测记录

优秀代码

信息

时间限制: 1s
内存限制: 128MB
评测模式: Normal

题解