File tree 5 files changed +89
-0
lines changed
5 files changed +89
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <classpath >
3
+ <classpathentry kind =" con" path =" org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11" >
4
+ <attributes >
5
+ <attribute name =" module" value =" true" />
6
+ </attributes >
7
+ </classpathentry >
8
+ <classpathentry kind =" src" path =" src" />
9
+ <classpathentry kind =" output" path =" bin" />
10
+ </classpath >
Original file line number Diff line number Diff line change
1
+ /bin /
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <projectDescription >
3
+ <name >P23</name >
4
+ <comment ></comment >
5
+ <projects >
6
+ </projects >
7
+ <buildSpec >
8
+ <buildCommand >
9
+ <name >org.eclipse.jdt.core.javabuilder</name >
10
+ <arguments >
11
+ </arguments >
12
+ </buildCommand >
13
+ </buildSpec >
14
+ <natures >
15
+ <nature >org.eclipse.jdt.core.javanature</nature >
16
+ </natures >
17
+ </projectDescription >
Original file line number Diff line number Diff line change
1
+ eclipse.preferences.version =1
2
+ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode =enabled
3
+ org.eclipse.jdt.core.compiler.codegen.targetPlatform =11
4
+ org.eclipse.jdt.core.compiler.codegen.unusedLocal =preserve
5
+ org.eclipse.jdt.core.compiler.compliance =11
6
+ org.eclipse.jdt.core.compiler.debug.lineNumber =generate
7
+ org.eclipse.jdt.core.compiler.debug.localVariable =generate
8
+ org.eclipse.jdt.core.compiler.debug.sourceFile =generate
9
+ org.eclipse.jdt.core.compiler.problem.assertIdentifier =error
10
+ org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures =disabled
11
+ org.eclipse.jdt.core.compiler.problem.enumIdentifier =error
12
+ org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures =warning
13
+ org.eclipse.jdt.core.compiler.release =enabled
14
+ org.eclipse.jdt.core.compiler.source =11
Original file line number Diff line number Diff line change
1
+ import java .util .Scanner ;
2
+
3
+ public class P23 {
4
+
5
+ public static void main (String [] args )
6
+ {
7
+ Scanner input =new Scanner (System .in );
8
+
9
+ System .out .println ("Please enter M,N (M>=N)" );
10
+ System .out .println ("Please enter M:" );
11
+ int M =input .nextInt ();
12
+ System .out .println ("Please enter N:" );
13
+ int N =input .nextInt ();
14
+
15
+ if (M <N )
16
+ {
17
+ int temp =M ;
18
+ M =N ;
19
+ N =temp ;
20
+ }
21
+
22
+ if (M <=0 )
23
+ M =1 ;
24
+ if (N <=0 )
25
+ N =1 ;
26
+
27
+
28
+ System .out .println (M + "," + N );
29
+
30
+ /// M>=N
31
+
32
+ int bmm =1 ;
33
+ for (int x =N ;x >0 ;x --)
34
+ {
35
+ if (M %x ==0 && N %x ==0 )
36
+ {
37
+ System .out .println ("BMM : " + x );
38
+ bmm =x ;
39
+ break ;
40
+ }
41
+ }
42
+
43
+ System .out .println ("KMM : " + (M *N )/bmm );
44
+
45
+ }
46
+
47
+ }
You can’t perform that action at this time.
0 commit comments