Created
December 8, 2015 16:45
-
-
Save Yur-ok/740c706525513964f073 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Lesson2.KeyPoint2; | |
/** | |
* Created by Юрий on 08.12.2015. | |
*/ | |
public class MinOfThreeMethod { | |
public static void main(String[] args) { | |
System.out.println(min(10, 15, 10)); | |
} | |
static int min(int a, int b, int c) { | |
if (a < b) { | |
return a; | |
} else { | |
if (b < c) { | |
return b; | |
} | |
return c; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Для случая min(10, 15, 1) Ваша программа работает не верно.