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

Commitc68443e

Browse files
Irani-LaptopIrani-Laptop
Irani-Laptop
authored and
Irani-Laptop
committed
first time
1 parent3366b47 commitc68443e

10 files changed

+147
-0
lines changed

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

‎P7P11/.gitignore

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

‎P7P11/.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>P7P11</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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
eclipse.preferences.version=1
2+
encoding//src/P10.java=UTF-8
3+
encoding//src/P11.java=UTF-8
4+
encoding//src/P9.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

‎P7P11/src/P10.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
importjava.util.Scanner;
2+
3+
publicclassP10 {
4+
5+
publicstaticvoidmain(String[]args)
6+
{
7+
Scannerinput=newScanner (System.in);
8+
9+
intsum =0;
10+
//for (int x=2 ; x<=100 ; x=x+2)
11+
//sum = sum + x;
12+
13+
14+
for (intx=1 ;x<=100 ;x++)
15+
if (x%2 ==1)//x فرد است
16+
sum =sum +x;
17+
18+
System.out.println("sum is : " +sum);
19+
20+
21+
22+
}
23+
24+
}

‎P7P11/src/P11.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
importjava.util.Scanner;
2+
3+
publicclassP11 {
4+
5+
publicstaticvoidmain(String[]args)
6+
{
7+
Scannerinput=newScanner (System.in);
8+
9+
System.out.println("Please enter n:");
10+
intn=input.nextInt();
11+
12+
13+
for (intx=1 ;x<=n ;x++)
14+
System.out.println(x);
15+
16+
17+
}
18+
19+
}

‎P7P11/src/P7.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
importjava.util.Scanner;
2+
3+
publicclassP7 {
4+
5+
publicstaticvoidmain(String[]args)
6+
{
7+
Scannerinput=newScanner (System.in);
8+
9+
for (intx=1 ;x<=10 ;x++)
10+
System.out.println(x);
11+
12+
13+
}
14+
15+
}

‎P7P11/src/P8.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
importjava.util.Scanner;
2+
3+
publicclassP8 {
4+
5+
publicstaticvoidmain(String[]args)
6+
{
7+
Scannerinput=newScanner (System.in);
8+
9+
intsum =0;
10+
for (intx=1 ;x<=10 ;x++)
11+
sum+=x;//sum = sum + x;
12+
13+
System.out.println("sum is : " +sum);
14+
15+
16+
17+
}
18+
19+
}

‎P7P11/src/P9.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
importjava.util.Scanner;
2+
3+
publicclassP9 {
4+
5+
publicstaticvoidmain(String[]args)
6+
{
7+
Scannerinput=newScanner (System.in);
8+
9+
intsum =0;
10+
//for (int x=2 ; x<=100 ; x=x+2)
11+
//sum = sum + x;
12+
13+
14+
for (intx=1 ;x<=100 ;x++)
15+
if (x%2 ==0)//x زوج است
16+
sum =sum +x;
17+
18+
System.out.println("sum is : " +sum);
19+
20+
21+
22+
}
23+
24+
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp