Skip to content

Instantly share code, notes, and snippets.

@Yur-ok
Created December 8, 2015 16:45
Show Gist options
  • Save Yur-ok/740c706525513964f073 to your computer and use it in GitHub Desktop.
Save Yur-ok/740c706525513964f073 to your computer and use it in GitHub Desktop.
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;
}
}
}
@liuiv15
Copy link

liuiv15 commented Dec 11, 2015

Для случая min(10, 15, 1) Ваша программа работает не верно.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment