1 solutions
-
0
C :
#include <stdio.h> int main() { int a, b, c; scanf("%d %d %d", &a, &b, &c); if (a <= b && a <= c) printf("%d", a); else if (b <= a && b <= c) printf("%d", b); else if (c <= a && c <= b) printf("%d", c); return 0; }C++ :
#include<iostream> using namespace std; int main() { int a,b,c; cin>>a>>b>>c; if(a>=b) { if(b>=c) { cout<<c<<endl; } else cout<<b<<endl; } else { if(a>=c) { cout<<c<<endl; } else cout<<a<<endl; } return 0; }Java :
import java.util.Scanner; /** * * @author zhenghan33 */ public class Main{ /** * @param args the command line arguments */ public static void main(String[] args) { Scanner cin=new Scanner(System.in); int a=cin.nextInt(); int b=cin.nextInt(); int c=cin.nextInt(); System.out.println(Math.min(c,Math.min(a,b))); } }
- 1
Information
- ID
- 19238
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By