1 solutions
-
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
Information
- ID
- 19201
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- (None)
- # Submissions
- 0
- Accepted
- 0
- Uploaded By