Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Solution
- {
- public static int min(int a, int b, int c)
- {
- int m1,m2;
- if (a<b);
- m1 = a;
- else
- m1 = b;
- if (c<m1);
- m2 = c;
- else
- m2 = m1;
- return m2;//напишите тут ваш код
- }
- public static void main(String[] args) throws Exception
- {
- System.out.println( min(1,2,3) );
- System.out.println( min(-1,-2,-3) );
- System.out.println( min(3,5,3) );
- System.out.println( min(10,5,10) );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement