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

Commit729ad21

Browse files
Irani-LaptopIrani-Laptop
Irani-Laptop
authored and
Irani-Laptop
committed
first time
1 parent86fdad5 commit729ad21

21 files changed

+450
-0
lines changed

‎P74/.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>

‎P74/.gitignore

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

‎P74/.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>P74</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/P74.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

‎P74/src/P74.java

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/**
2+
* P74 : جدول ضرب اعداد
3+
*
4+
* @author Gholamali Nejad Hajali Irani
5+
* @version 1.0
6+
* @since 2021/01/29
7+
* @Team gClassAcademy
8+
* @Website youtube.com/gClassAcademy
9+
*
10+
*/
11+
12+
importjava.util.Scanner;
13+
14+
publicclassP74
15+
{
16+
publicstaticvoidmain(String[]args)
17+
{
18+
Scannerinput=newScanner (System.in);
19+
20+
21+
System.out.println();
22+
for (intx=1;x<=10;x++)
23+
{
24+
for (inty=1;y<=10;y++)
25+
if (x*y>=1 &&x*y<=9)
26+
System.out.print(" " +x*y +" ");
27+
else
28+
System.out.print(x*y +" ");
29+
System.out.println("");
30+
}
31+
32+
33+
34+
35+
36+
37+
}// end of main
38+
}// end of class
39+
40+
41+
42+
43+
44+
45+
46+
47+

‎P76/.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>

‎P76/.gitignore

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

‎P76/.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>P76</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/P76.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

‎P76/src/P76.java

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
/**
2+
* P76 : تشخیص وجود یک عدد در سری فیبوناچی و اول بودن آن در بین 100 عدد
3+
*
4+
* @author Gholamali Nejad Hajali Irani
5+
* @version 1.0
6+
* @since 2021/01/29
7+
* @Team gClassAcademy
8+
* @Website youtube.com/gClassAcademy
9+
*/
10+
11+
importjava.util.Scanner;
12+
13+
publicclassP76
14+
{
15+
publicstaticvoidmain(String[]args)
16+
{
17+
Scannerinput=newScanner (System.in);
18+
19+
intn=0;// عددی که هر مرحله از کاربر دریافت میشود
20+
intallcount=0;// تعداد اعدادی که هم اول و هم فیبوناچی هستن
21+
22+
for (intx=1;x<=100;x++)
23+
{
24+
// گرفتن n
25+
System.out.println("Enter n" +x +": ");
26+
n=input.nextInt();
27+
28+
// محاسبات روی n
29+
30+
// بررسی وجود n در سری فیبوناچی
31+
longa=1;//عدد اول در سری فیبوناچی
32+
longb=1;//عدد دوم در سری فیبوناچی
33+
longc=0;//عدد جمع دوتای قبلی در سری فیبوناچی
34+
while (c<n &&n!=1)
35+
{
36+
c=a+b;
37+
//System.out.println(count + ": " + c);
38+
a=b;
39+
b=c;
40+
}
41+
42+
43+
// عدد فیبوناچی هست
44+
if (c==n ||n==1)
45+
{
46+
//System.out.println("yes");
47+
48+
//بررسی اول بودن n
49+
intcount=0;
50+
for (inty=1;y<=n;y++)
51+
if (n%y==0)
52+
count++;
53+
54+
// عدد n اول هست
55+
if (count==2)
56+
allcount++;
57+
}
58+
59+
60+
}// end of for x
61+
62+
63+
System.out.println("All count is: " +allcount);
64+
65+
66+
67+
68+
69+
70+
71+
72+
73+
74+
}// end of main
75+
}// end of class

‎P77P80/.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>

‎P77P80/.gitignore

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

‎P77P80/.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>P77P80</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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
eclipse.preferences.version=1
2+
encoding//src/P77.java=UTF-8
3+
encoding//src/P78.java=UTF-8
4+
encoding//src/P79.java=UTF-8
5+
encoding//src/P80.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

‎P77P80/src/P77.java

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

‎P77P80/src/P78.java

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* P78 : چاپ اعداد کامل کمتر از 1000
3+
*
4+
* @author Gholamali Nejad Hajali Irani
5+
* @version 1.0
6+
* @since 2021/01/29
7+
* @Team gClassAcademy
8+
* @Website youtube.com/gClassAcademy
9+
*
10+
*/
11+
12+
importjava.util.Scanner;
13+
14+
publicclassP78
15+
{
16+
publicstaticvoidmain(String[]args)
17+
{
18+
Scannerinput=newScanner (System.in);
19+
20+
21+
for (intn=1;n<=10000;n++)
22+
{
23+
intsum=0;// برای جمع مقسوم علیه های n بجز خودش
24+
25+
for (intx=1;x<=n/2;x++)
26+
if (n%x==0)
27+
sum+=x;
28+
29+
30+
if (sum==n)
31+
System.out.println(n);
32+
}
33+
34+
}// end of main
35+
}// end of class
36+
37+
38+
39+
40+
41+
42+
43+
44+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp