Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Solution
- {
- public static void main(String[] args) throws Exception
- {
- BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
- int a = Integer.parseInt(reader.readLine());
- int b = Integer.parseInt(reader.readLine());
- int c = Integer.parseInt(reader.readLine());
- int d = Integer.parseInt(reader.readLine());
- int e = Integer.parseInt(reader.readLine());
- int minimum = min(a, b, c, d, e);
- System.out.println("Minimum = " + minimum);
- }
- public static int min(int a, int b, int c, int d, int e)
- {
- int massive[] = {a, b, c, d, e};
- int min = massive[0];
- for (int i = 0; i != massive.length; i++) {
- if (min>massive[i]);
- min = massive[i];
- }
- return min;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement