首页 > 小乐乐计算函数
头像 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; 展开全文