首页
比赛
题库
课程
竞赛讨论区
登录
/
注册
去牛客
首页
>
小乐乐计算函数
84条解析
开通博客写题解
viod
发表于 2021-06-07 11:31:03
先定义一个max3()函数返回3个数的最大,然后主函数调用max3()计算: #include<stdio.h> int max3(int a,int b,int c){ if(a>b) b=a; return b>c?b:c; } int main(){
展开全文
Zerone·
发表于 2022-05-27 18:30:06
">int max3(float a, float b, float c) { if (a >= b && a >= c) return a; else if (b >= a && b >= c) return b; e
展开全文
叶花永不相见
发表于 2022-03-05 20:20:36
#include<stdio.h> int max3(int a, int b, int c) { int max = a; if(max < b) max = b; if(max < c) max = c; r
展开全文
牛客575029355号
发表于 2022-05-18 20:59:05
#include<stdio.h> int max3(int a,int b,int c) { return a>b? a>c?a:c : b>
展开全文
canwen
发表于 2022-06-14 10:28:14
#2022/6/14 10:27 a,b,c=map(int,input().split()) max1=max(a+b,b,c) max2=max(a,b+c,c) max3=max(a,b,b+c) m=max1/(max2+max3) print("{:.2f}".format(m))
melon.
发表于 2022-12-24 15:13:16
def f(a,b,c): if a > b: max = a else: max = b if max < c: max = c return max nums = input() lst
展开全文
克里里克kliric
发表于 2024-11-23 23:16:43
#include <stdio.h> int max(int x, int y, int z)//最大函数 { int arr[3] = {0}; arr[0] = x; arr[1] = y; arr[2] = z; int i; in
展开全文
new_jytx
发表于 2024-01-02 15:54:41
#include<stdio.h> int max3(a, b, c) { if (a > b && a > c) return a; else if (b > a && b > c)
展开全文
刘肯搏
发表于 2024-10-21 16:47:16
#include <stdio.h> int main() { int max(int a,int b,int c); int a,b,c; scanf("%d %d %d",&a,&b,&c); int x,y
展开全文
宿傩大爷
发表于 2023-11-19 21:19:20
#include <stdio.h> int max3(int a,int b,int c) { int max=a>(b>c?b:c)?a:(b>c?b:c); return max; } int main() { int a,b,c;
展开全文
查看本题
查看本题讨论
相关比赛
1869-哈尔滨理工大学软件与微电子学院程序设计竞赛(新生赛)
进入比赛
1877-哈尔滨理工大学软件与微电子学院程序设计竞赛(新生赛)-同步赛
进入比赛
3206-石家庄学院 物理学院 机电学院ACM新生赛
进入比赛
23944-2021年第四届“传智杯”全国大学生IT技能大赛
进入比赛
26404-练习赛_001
进入比赛
等你来战
查看全部
第二十二届宁波大学程序设计竞赛(同步赛)
报名截止时间:2025-06-08 17:00
衡阳师范学院第二十五届程序设计竞赛(同步赛)
报名截止时间:2025-06-08 18:00
牛客周赛 Round 95
报名截止时间:2025-06-08 21:00
牛客小白月赛118
报名截止时间:2025-06-13 21:00
第五届上海理工大学程序设计全国挑战赛
报名截止时间:2025-06-22 17:00
2025牛客暑期多校训练营1
报名截止时间:2025-07-15 17:00
扫描二维码,关注牛客
意见反馈
下载牛客APP,随时随地刷题