8 条题解
- 1
信息
- ID
- 112
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 3
- 标签
- (无)
- 递交数
- 965
- 已通过
- 523
- 上传者
#include<stdio.h> int main() { int a,b,c; scanf("%d %d %d",&a,&b,&c); int max=a; if(b>max&&b>c) { printf("the max value is:%d",b); }else if(c>max&&c>b) { printf("the max value is:%d",c); }else{ printf("the max value is:%d",a); } return 0; }
#include <stdio.h> int main(){ int a,b,c; int max(int x, int y); scanf("%d %d %d",&a,&b,&c); printf("%d",max(max(a,b),c)); return 0; } int max(int x, int y){ return x>y?x:y; }
#include<stdio.h> int main() { int a,b,c; // printf ("输入a,b,c:"); scanf("%d %d %d",&a,&b,&c); int max; max=(a>b)?(b>c?a:(a>c?a:c)):(b<c?c:b); printf("%d",max); return 0;
}
#include<iostream>
#include<algorithm>
using namespace std;
int main(){
int a,b,c;
scanf("%d%d%d",&a,&b,&c);
cout<<""<<max({a,b,c})<<endl;
}
#include<stdio.h> int main() { int j,k,l,max; scanf("%d %d %d",&j,&k,&l); max=j>k?(j>l?j:l):(k>l?k:l); printf("%d",max); return 0; }//练练三目