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);
}
I don't understand why we should try to dothis question here,if people are not familar with recursion,they have a hard time to do this for sure XD.
Under discussion
Comments (2)
- Popular
- New
- Old
You must be signed in to leave a comment
Misiu
19 October 2020, 17:45
Without recursion:
int f = min(a, b);
int g = min(f, c);
and so on...
Hard? Maybe...
0
Guanting Liu
20 October 2020, 08:04
It is not true for this question's answer if u try this method although it is probably the first thing as a beginner liket me think lol.That's why I ask
0