要求:用户输入两个直角边(数值为浮点类型),若非浮点类型,则提示用户,继续输入。
思路:伪代码描述下步骤
1、-input a value for the base as a float(输入某浮点数作为底边值)
2、-input a value for the height as a float(输入某浮点数作为高的值)
3、-square root--b squared plus h squared(求平方和和开根号)
4、-save that as a float in hype,for hypotenuse(把结果存为hyp,表示斜边)
5、-print something out,using the value in hyp.(打印出结果)
Copyright © 2019- pjhl.cn 版权所有
违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务