原文:JS-练习:写一个函数,用户输入三个不同的数字,输出最大值

代码如下: lt script gt function getMax n , n , n if n gt n amp amp n gt n return n else if n gt n amp amp n gt n return n else return n var re getMax , , console.log re 实际开发中,经常使用变量获得返回的值 lt script gt 浏览器 ...

2022-02-19 19:09 0 881 推荐指数:

查看详情

python应用-输入三个数,输出最大值

""" 输入三个数,输出最大值 Author:罗万财 Date:2017-7-6 """ a=int(input('a=')) b=int(input('b=')) c=int(input('c=')) my_max=a>b and a or b my_max=c> ...

Mon Mar 12 06:23:00 CST 2018 0 5640
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM