1 条题解
-
0
C :
#include<stdio.h> int main() { int a,b,c,max; scanf("%d%d%d",&a,&b,&c); max=a>b?a:b; max=max>c?max:c; printf("%d\n",max); return 0; }
C++ :
#include<iostream> #include<fstream> #include<string> #include<cstring> #include<cmath> using namespace std; void change(int& x,int & y) { int temp; temp=x;x=y;y=temp; } int main() { //ifstream cin("aaa.txt"); int i,j,n; int x,y,z; cin>>x>>y>>z; if(x<y) change(x,y); if(x<z) change(x,z); cout<<x<<endl; return 0; }
- 1
信息
- ID
- 1413
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- (无)
- 递交数
- 0
- 已通过
- 0
- 上传者