首页
比赛
题库
课程
竞赛讨论区
登录
/
注册
去牛客
首页
>
最大最小值
21条解析
开通博客写题解
Tender^
发表于 2021-09-12 18:39:02
直接使用fmax()、fmin()函数即可 #include<bits/stdc++.h> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; int max_n
展开全文
牛客牛我不牛
发表于 2021-11-10 19:07:41
C语言。。 我太拉了,快把自己算晕了 #include <stdlib.h> int main() { int a,b,c,max,min; scanf("%d%d%d",&a,&b,&c); if(a>b) {
展开全文
麻花蘸豆浆
发表于 2020-02-09 17:24:51
include<stdio.h> int main(){ int a[3],max=0,min=1000000; for(int i=0;i<3;i++){ scanf("%d",&a[i]); } for(int i=0;i<3
展开全文
〆、续写不尽的未来。
发表于 2020-02-29 15:54:15
注意三个数比较的次序#include <iostream>using namespace std;int main(){ int a,b,c,t; cin>>a>>b>>c; if(a>b){ t=a;
展开全文
Aju要上广大
发表于 2023-02-03 17:01:29
#include using namespace std; int main() { int a=0,b=0,c=0,max=0,min=0; cin>>a>>b>>c; max=(a>b)?a:b; max=(max>c)?max:c; min=(a
展开全文
HUAYI_SUN
发表于 2022-11-12 17:44:32
#include<iostream> using namespace std; #include<algorithm> int main() { int a,b,c; &nbs
展开全文
牛客623496257号
发表于 2021-10-16 22:53:16
#include<stdio.h> int main(){ int a,b,c; scanf("%d %d %d",&a,&b,&c); int max,min; if(a>b){ max = a; } else max = b; if(c>max){
展开全文
多巴胺3
发表于 2022-04-20 12:48:52
#include <stdio.h> int main() { int a,b,c,max,min; scanf("%d %d %d",&a,&b,&c); if(a>=b)
展开全文
牛客798204514号
发表于 2024-12-01 23:52:08
使用vector容器的做法,排序后直接返回容器中第一个元素v.front()和容器中最后一个元素v.back(),即为三个数中的最大值和最小值 #include<iostream> #include<vector> #include<algorithm> usin
展开全文
已注销
发表于 2021-02-22 12:17:21
#include<stdio.h> int main(){ //define 2 "useless numbers" int a[3],max = 0, min = 1000000; // give values of the array by one loop
展开全文
查看本题
查看本题讨论
相关比赛
18150-阿尔法-C++日常训练(2星)
进入比赛
18163-阿尔法-C++习题课(2星)
进入比赛
18164-阿尔法-C++习题课(1~2星)
进入比赛
18303-2021暑假编程基础练习-循环
进入比赛
18388-暑假第一周Java基础训练
进入比赛
等你来战
查看全部
牛客小白月赛115
报名截止时间:2025-04-25 21:00
牛客周赛 Round 91
报名截止时间:2025-04-27 21:00
2025牛客五一集训派对day1
报名截止时间:2025-05-01 17:00
2025牛客五一集训派对day2
报名截止时间:2025-05-02 17:00
2025牛客五一集训派对day3
报名截止时间:2025-05-03 17:00
2025牛客五一集训派对day4
报名截止时间:2025-05-04 17:00
2025牛客五一集训派对day5
报名截止时间:2025-05-05 17:00
牛客周赛 Round 92
报名截止时间:2025-05-11 21:00
哈尔滨华德学院第十六届程序设计竞赛(同步赛)
报名截止时间:2025-05-13 20:30
扫描二维码,关注牛客
意见反馈
下载牛客APP,随时随地刷题