Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb7f1a93

Browse files
Irani-LaptopIrani-Laptop
Irani-Laptop
authored and
Irani-Laptop
committed
first time
1 parentfdaaa9c commitb7f1a93

12 files changed

+191
-0
lines changed

‎P57P58/.classpath

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentrykind="con"path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
4+
<attributes>
5+
<attributename="module"value="true"/>
6+
</attributes>
7+
</classpathentry>
8+
<classpathentrykind="src"path="src"/>
9+
<classpathentrykind="output"path="bin"/>
10+
</classpath>

‎P57P58/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/bin/

‎P57P58/.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>P57P58</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>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding//src/P57P58.java=UTF-8
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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

‎P57P58/src/P57P58.java

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/**
2+
* P5758 : ب.م.م و ک.م.م دو عدد با تکرار نامعین
3+
*
4+
* @author Gholamali Nejad Hajali Irani
5+
* @version 1.0
6+
* @since 2021/01/15
7+
* @Team gClassAcademy
8+
* @Website https://www.youtube.com/c/gClassAcademy
9+
*/
10+
11+
importjava.util.Scanner;
12+
13+
publicclassP57P58
14+
{
15+
publicstaticvoidmain(String[]args)
16+
{
17+
Scannerinput=newScanner (System.in);
18+
19+
// گرفتن دو عدد از کاربر
20+
intm=0;// عدد اول
21+
intn;// عدد دوم
22+
23+
System.out.println("Enter m: ");
24+
m=input.nextInt();
25+
System.out.println("Enter n: ");
26+
n=input.nextInt();
27+
28+
if (m<n)
29+
{
30+
inttemp=m;
31+
m=n;
32+
n=temp;
33+
}
34+
intm1=m;
35+
intn1=n;
36+
//System.out.println(m + "," + n);
37+
38+
while (m%n !=0)
39+
{
40+
intr =m%n;
41+
m=n;
42+
n=r;
43+
}
44+
45+
System.out.println("BMM is: " +n);
46+
47+
System.out.println("KMM is:" +m1*n1 /n);
48+
49+
50+
51+
52+
}// end of main
53+
}// end of class

‎P59/.classpath

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentrykind="con"path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
4+
<attributes>
5+
<attributename="module"value="true"/>
6+
</attributes>
7+
</classpathentry>
8+
<classpathentrykind="src"path="src"/>
9+
<classpathentrykind="output"path="bin"/>
10+
</classpath>

‎P59/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/bin/

‎P59/.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>P59</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>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding//src/P59.java=UTF-8
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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

‎P59/src/P59.java

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/**
2+
* P59 : تجزیه یک عدد به عوامل اول
3+
*
4+
* @author Gholamali Nejad Hajali Irani
5+
* @version 1.0
6+
* @since 2021/01/15
7+
* @Team gClassAcademy
8+
* @Website https://www.youtube.com/c/gClassAcademy
9+
*/
10+
11+
importjava.util.Scanner;
12+
13+
publicclassP59
14+
{
15+
publicstaticvoidmain(String[]args)
16+
{
17+
Scannerinput=newScanner (System.in);
18+
19+
System.out.println("Enter n:");
20+
intn=input.nextInt();// عددی که قرار هست به عوامل اول تجزیه شود
21+
22+
intk=2;// عددی که هر بار n بر آن تقسیم میشود
23+
while (n>1)
24+
{
25+
// تقسیمات متوالی n بر k
26+
intcount=0;
27+
while (n%k==0)
28+
{
29+
n=n/k;
30+
count++;
31+
}
32+
33+
// چاپ نتیجه تا این بخش از محاسبه
34+
if (count ==1 &&n>1)
35+
System.out.print(k +"*");
36+
elseif (count ==1 &&n==1)
37+
System.out.print(k);
38+
elseif (count !=0 &&n>1)
39+
System.out.print(k +"^" +count +"*");
40+
elseif (count !=0 &&n==1)
41+
System.out.print(k +"^" +count);
42+
43+
k++;
44+
}
45+
46+
47+
48+
49+
}// end of main
50+
}// end of class

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp