We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98192e4 commit 723d0d4Copy full SHA for 723d0d4
Test18_Min_number_input.java
@@ -0,0 +1,39 @@
1
+// Find Minimum number between two Numbers by taking User Input
2
+package com.test.Basic_Java_Programs;
3
+
4
+import java.util.Scanner;
5
6
+public class Test18_Min_number_input
7
+{
8
+ public static void main(String[] args)
9
+ {
10
+ int a, b;
11
12
+ System.out.print("Enter two Numbers : ");
13
14
+ Scanner sc = new Scanner(System.in);
15
16
+ a = sc.nextInt();
17
18
+ b = sc.nextInt();
19
20
+ if (a < b)
21
22
+ System.out.println(a);
23
+ }
24
+ else
25
26
+ System.out.println(b);
27
28
29
30
31
+}
32
33
34
+/* Output:
35
36
+Enter two Numbers : 50 100
37
+50
38
39
+*/
0 commit comments