File tree 31 files changed +467
-0
lines changed
31 files changed +467
-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 >P31</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
+ encoding//src/P31.java =UTF-8
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 P31 {
4
+
5
+ public static void main (String [] args )
6
+ {
7
+ Scanner input =new Scanner (System .in );
8
+
9
+ int CC =0 ; //برای تعداد اعداد اول
10
+ int count =0 ;
11
+ for (int n =1 ;n <=1000 ;n ++)
12
+ {
13
+ count =0 ;
14
+ for (int x =1 ; x <=n ; x ++)
15
+ if (n %x ==0 )
16
+ count ++;
17
+
18
+ //System.out.println(count);
19
+ if (count ==2 )
20
+ {
21
+ CC ++;
22
+ System .out .println (CC + " : " + n );
23
+ }
24
+ }
25
+
26
+
27
+
28
+ }
29
+
30
+ }
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 >P32-35</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 P32 {
4
+
5
+ public static void main (String [] args )
6
+ {
7
+ Scanner input =new Scanner (System .in );
8
+
9
+ int n =input .nextInt ();
10
+
11
+ for (int x =1 ;x <=n ;x ++)
12
+ if (n %x ==0 && x >=10 && x <=99 )
13
+ System .out .println (x );
14
+
15
+
16
+ }
17
+
18
+ }
Original file line number Diff line number Diff line change
1
+ import java .util .Scanner ;
2
+
3
+ public class P33 {
4
+
5
+ public static void main (String [] args )
6
+ {
7
+ Scanner input =new Scanner (System .in );
8
+
9
+ int n =input .nextInt ();
10
+
11
+ int sum =0 ;
12
+ for (int x =1 ;x <=n ;x ++)
13
+ if (n %x ==0 && x >=10 && x <=99 )
14
+ {
15
+ System .out .println (x );
16
+ sum = sum +x ;
17
+ }
18
+
19
+ System .out .println ("sum is:" + sum );
20
+ }
21
+
22
+ }
Original file line number Diff line number Diff line change
1
+ import java .util .Scanner ;
2
+
3
+ public class P34 {
4
+
5
+ public static void main (String [] args )
6
+ {
7
+ Scanner input =new Scanner (System .in );
8
+
9
+ int n =input .nextInt ();
10
+
11
+ int sum =0 ;
12
+ int count =0 ;
13
+ for (int x =1 ;x <=n ;x ++)
14
+ if (n %x ==0 && x >=10 && x <=99 )
15
+ {
16
+ System .out .println (x );
17
+ sum = sum +x ;
18
+ count ++;
19
+ }
20
+
21
+ System .out .println ("sum is:" + sum );
22
+ System .out .println ("count is:" + count );
23
+ }
24
+
25
+ }
Original file line number Diff line number Diff line change
1
+ import java .util .Scanner ;
2
+
3
+ public class P35 {
4
+
5
+ public static void main (String [] args )
6
+ {
7
+ Scanner input =new Scanner (System .in );
8
+
9
+ int n =input .nextInt ();
10
+
11
+ int sum =0 ;
12
+ int count =0 ;
13
+ for (int x =1 ;x <=n ;x ++)
14
+ if (n %x ==0 && x >=10 && x <=99 )
15
+ {
16
+ System .out .println (x );
17
+ sum = sum +x ;
18
+ count ++;
19
+ }
20
+
21
+ System .out .println ("sum is:" + sum );
22
+ System .out .println ("count is:" + count );
23
+ System .out .println ("Avg is:" + (1.0 *sum /count ));
24
+
25
+ }
26
+
27
+ }
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 >P36P37</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 P36 {
4
+
5
+ public static void main (String [] args )
6
+ {
7
+ Scanner input =new Scanner (System .in );
8
+
9
+
10
+
11
+ int n =0 ;
12
+ int CC =0 ;
13
+
14
+ for (int y =1 ;y <=100 ;y ++)
15
+ {
16
+ n =input .nextInt ();
17
+
18
+ //Calc
19
+ int count =0 ;
20
+ for (int x =1 ; x <=n ; x ++)
21
+ if (n %x ==0 )
22
+ count ++;
23
+
24
+ if (count ==2 )
25
+ CC ++;
26
+ }
27
+
28
+ System .out .println ("Prime count is: " + CC );
29
+
30
+
31
+
32
+ }
33
+
34
+ }
Original file line number Diff line number Diff line change
1
+ import java .util .Scanner ;
2
+
3
+ public class P37 {
4
+
5
+ public static void main (String [] args )
6
+ {
7
+ Scanner input =new Scanner (System .in );
8
+
9
+
10
+
11
+ int n =0 ;
12
+ int sum =0 ;
13
+
14
+ for (int y =1 ;y <=100 ;y ++)
15
+ {
16
+ n =input .nextInt ();
17
+
18
+ //Calc
19
+ int count =0 ;
20
+ for (int x =1 ; x <=n ; x ++)
21
+ if (n %x ==0 )
22
+ count ++;
23
+
24
+ if (count ==2 )
25
+ sum =sum +n ;
26
+ }
27
+
28
+ System .out .println ("Prime sum is: " + sum );
29
+
30
+
31
+
32
+ }
33
+
34
+ }
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 >P38</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
You can’t perform that action at this time.
0 commit comments