1 solutions
-
0
C :
#include<stdio.h> int main() { int a,b,c,t; scanf("%d%d%d",&a,&b,&c); if(a<b) a=b; if(b<c) b=c; if(a<b) a=b; printf("%d\n",a); return 0; }C++ :
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a>b&&a>c) cout<<a; if(b>a&&b>c) cout<<b; if(c>b&&c>a) cout<<c; }Pascal :
var s,i,t,j:integer; a:array [1..3] of integer; begin for i:=1 to 3 do read(a[i]); for i:=1 to 3-1 do for j:=i+1 to 3 do if a[i]<a[j] then begin t:=a[i]; a[i]:=a[j]; a[j]:=t; end; write(a[1]); end.
- 1
Information
- ID
- 19034
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By