diff --git a/P12P22/.classpath b/P12P22/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P12P22/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P12P22/.gitignore b/P12P22/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P12P22/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P12P22/.project b/P12P22/.project deleted file mode 100644 index 6029ab8..0000000 --- a/P12P22/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P12P22</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P12P22/.settings/org.eclipse.core.resources.prefs b/P12P22/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 41d2fdb..0000000 --- a/P12P22/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,12 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P12.java=UTF-8 -encoding//src/P13.java=UTF-8 -encoding//src/P14.java=UTF-8 -encoding//src/P15.java=UTF-8 -encoding//src/P16.java=UTF-8 -encoding//src/P17.java=UTF-8 -encoding//src/P18.java=UTF-8 -encoding//src/P19.java=UTF-8 -encoding//src/P20.java=UTF-8 -encoding//src/P21.java=UTF-8 -encoding//src/P22.java=UTF-8 diff --git a/P12P22/.settings/org.eclipse.jdt.core.prefs b/P12P22/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P12P22/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P12P22/src/P12.java b/P12P22/src/P12.java deleted file mode 100644 index 4cddf5c..0000000 --- a/P12P22/src/P12.java +++ /dev/null @@ -1,20 +0,0 @@ -import java.util.Scanner; - -public class P12 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Please enter n:"); - int n=input.nextInt(); - - - for (int x=1 ; x<=n ; x++) - if (n%x==0) //n بر x بخش پذیر باشد - System.out.println(x); - - - } - -} diff --git a/P12P22/src/P13.java b/P12P22/src/P13.java deleted file mode 100644 index 833773d..0000000 --- a/P12P22/src/P13.java +++ /dev/null @@ -1,26 +0,0 @@ -import java.util.Scanner; - -public class P13 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Please enter n:"); - int n=input.nextInt(); - - -// for (int x=1 ; x<=n ; x++) -// if (n%x==0) //n بر x بخش پذیر باشد -// if (x%2==1) //x فرد باشد -// System.out.println(x); - - - for (int x=1 ; x<=n ; x++) - if ((n%x==0) && (x%2==1)) //n بر x بخش پذیر باشد x فرد باشد - System.out.println(x); - - - } - -} diff --git a/P12P22/src/P14.java b/P12P22/src/P14.java deleted file mode 100644 index c16aac8..0000000 --- a/P12P22/src/P14.java +++ /dev/null @@ -1,26 +0,0 @@ -import java.util.Scanner; - -public class P14 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Please enter n:"); - int n=input.nextInt(); - - -// for (int x=1 ; x<=n ; x++) -// if (n%x==0) //n بر x بخش پذیر باشد -// if (x%2==0) //x زوج باشد -// System.out.println(x); - - - for (int x=1 ; x<=n ; x++) - if ((n%x==0) && (x%2==0)) //n بر x بخش پذیر باشد x زوج باشد - System.out.println(x); - - - } - -} diff --git a/P12P22/src/P15.java b/P12P22/src/P15.java deleted file mode 100644 index 41051fb..0000000 --- a/P12P22/src/P15.java +++ /dev/null @@ -1,27 +0,0 @@ -import java.util.Scanner; - -public class P15 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Please enter n:"); - int n=input.nextInt(); - - - int sum=0; - - for (int x=1 ; x<=n ; x++) - if (n%x==0) - { - sum =sum + x; - System.out.println(x); - } - - System.out.println("sum is : " + sum); - - - } - -} diff --git a/P12P22/src/P16.java b/P12P22/src/P16.java deleted file mode 100644 index bb36e78..0000000 --- a/P12P22/src/P16.java +++ /dev/null @@ -1,27 +0,0 @@ -import java.util.Scanner; - -public class P16 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Please enter n:"); - int n=input.nextInt(); - - - int count=0; - - for (int x=1 ; x<=n ; x++) - if (n%x==0) - { - System.out.println(x); - count++; - } - - System.out.println("Count is : " +count); - - - } - -} diff --git a/P12P22/src/P17.java b/P12P22/src/P17.java deleted file mode 100644 index 1853c7b..0000000 --- a/P12P22/src/P17.java +++ /dev/null @@ -1,27 +0,0 @@ -import java.util.Scanner; - -public class P17 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Please enter n:"); - int n=input.nextInt(); - - - int sum=0; - - for (int x=1 ; x<=n ; x++) - if (n%x==0 && x%2==1) - { - System.out.println(x); - sum = sum + x; - } - - System.out.println("Count is : " +sum); - - - } - -} diff --git a/P12P22/src/P18.java b/P12P22/src/P18.java deleted file mode 100644 index 626499a..0000000 --- a/P12P22/src/P18.java +++ /dev/null @@ -1,27 +0,0 @@ -import java.util.Scanner; - -public class P18 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Please enter n:"); - int n=input.nextInt(); - - - int count=0; - - for (int x=1 ; x<=n ; x++) - if (n%x==0 && x%2==1) - { - System.out.println(x); - count = count +1; - } - - System.out.println("Count is : " +count); - - - } - -} diff --git a/P12P22/src/P19.java b/P12P22/src/P19.java deleted file mode 100644 index d604419..0000000 --- a/P12P22/src/P19.java +++ /dev/null @@ -1,26 +0,0 @@ -import java.util.Scanner; - -public class P19 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Please enter n:"); - int n=input.nextInt(); - - - int sum=0; - for (int x=1 ; x<=n ; x++) - if (n%x==0 && x%2==0) - { - sum = sum + x; - System.out.println(x); - } - - System.out.println("sum is : " + sum); - - - } - -} diff --git a/P12P22/src/P20.java b/P12P22/src/P20.java deleted file mode 100644 index 1d7260b..0000000 --- a/P12P22/src/P20.java +++ /dev/null @@ -1,26 +0,0 @@ -import java.util.Scanner; - -public class P20 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Please enter n:"); - int n=input.nextInt(); - - - int count=0; - for (int x=1 ; x<=n ; x++) - if (n%x==0 && x%2==0) - { - count = count + 1; - System.out.println(x); - } - - System.out.println("sum is : " + count); - - - } - -} diff --git a/P12P22/src/P21.java b/P12P22/src/P21.java deleted file mode 100644 index 1f75da4..0000000 --- a/P12P22/src/P21.java +++ /dev/null @@ -1,30 +0,0 @@ -import java.util.Scanner; - -public class P21 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Please enter n:"); - int n=input.nextInt(); - - int sum=0; - int count=0; - - for (int x=1 ; x<=n ; x++) - if (n%x==0) - { - count++; - sum = sum + x; - System.out.println(x); - } - - System.out.println("sum is : " + sum); - System.out.println("count is : " + count); - - System.out.println("Avg is :" + 1.0 * sum/count); - - } - -} diff --git a/P12P22/src/P22.java b/P12P22/src/P22.java deleted file mode 100644 index f50fbd2..0000000 --- a/P12P22/src/P22.java +++ /dev/null @@ -1,30 +0,0 @@ -import java.util.Scanner; - -public class P22 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Please enter n:"); - int n=input.nextInt(); - - int sum=0; - int count=0; - - for (int x=1 ; x<=n ; x++) - if (n%x==0 && x%2==0) - { - count++; - sum = sum + x; - System.out.println(x); - } - - System.out.println("\nsum is : " + sum); - System.out.println("count is : " + count); - - System.out.println("Avg is : " + 1.0 * sum/count); - - } - -} diff --git a/P1P2P3/.classpath b/P1P2P3/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P1P2P3/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P1P2P3/.gitignore b/P1P2P3/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P1P2P3/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P1P2P3/.project b/P1P2P3/.project deleted file mode 100644 index 12506dd..0000000 --- a/P1P2P3/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P1P2P3</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P1P2P3/.settings/org.eclipse.core.resources.prefs b/P1P2P3/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7dd50f5..0000000 --- a/P1P2P3/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,4 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P1.java=UTF-8 -encoding//src/P2.java=UTF-8 -encoding//src/P3.java=UTF-8 diff --git a/P1P2P3/.settings/org.eclipse.jdt.core.prefs b/P1P2P3/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P1P2P3/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P1P2P3/src/P1.java b/P1P2P3/src/P1.java deleted file mode 100644 index 0d94fa2..0000000 --- a/P1P2P3/src/P1.java +++ /dev/null @@ -1,40 +0,0 @@ - -import java.util.Scanner; -public class P1 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.print("Please enter n (1..365): "); - int n=input.nextInt(); - - - // month 1..6 - if (n>=1 && n<=186) - { - if (n%31==0) - System.out.println("month No is : " + (n/31)); - else - System.out.println("month No is : " + (n/31 + 1)); - } - - // month 6..11 - else if (n>=187 && n<=336) - { - int m=n-186; - if (m%30==0) - System.out.println("month No is : " + (m/30 + 6)); - else - System.out.println("month No is : " + (m/30 + 7)); - } - - // month 12 - else if (n>=337 && n<=366) - System.out.println("month No is : " + 12); - - else - System.out.println("no answer..."); - - } -} diff --git a/P1P2P3/src/P2.java b/P1P2P3/src/P2.java deleted file mode 100644 index db63d5c..0000000 --- a/P1P2P3/src/P2.java +++ /dev/null @@ -1,56 +0,0 @@ - -import java.util.Scanner; -public class P2 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - - System.out.print("Please enter n (1..365): "); - int n=input.nextInt(); - - - // month 1..6 - if (n>=1 && n<=186) - { - if (n%31==0) - { - System.out.println("month No is : " + (n/31)); - System.out.println("day of month is : " + 31); - } - else - { - System.out.println("month No is : " + (n/31 + 1)); - System.out.println("day of month is : " + n%31); - } - } - - // month 6..11 - else if (n>=187 && n<=336) - { - int m=n-186; - if (m%30==0) - { - System.out.println("month No is : " + (m/30 + 6)); - System.out.println("day of month is : " + 30); - } - else - { - System.out.println("month No is : " + (m/30 + 7)); - System.out.println("day of month is : " + m%30); - } - } - - // month 12 - else if (n>=337 && n<=366) - { - System.out.println("month No is : " + 12); - System.out.println("day of month is : " + (n-336)); - } - - else - System.out.println("no answer..."); - - } -} diff --git a/P1P2P3/src/P3.java b/P1P2P3/src/P3.java deleted file mode 100644 index d63a68b..0000000 --- a/P1P2P3/src/P3.java +++ /dev/null @@ -1,35 +0,0 @@ - -import java.util.Scanner; -public class P3 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.print("Please enter n to ATM: "); - int n=input.nextInt(); - - int r50=0; - int r10=0; - int r5=0; - int r1=0; - - r50 = n/50; //107 - - System.out.println(r50 + " *50"); - - n = n- r50 * 50; - r10 = n/10; - System.out.println(r10 + " *10"); - - n = n -r10*10; - - r5=n/5; - System.out.println(r5 + " *5"); - - n = n -r5*5; - System.out.println(n + " *1"); - - - } -} diff --git a/P23/.classpath b/P23/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P23/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P23/.gitignore b/P23/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P23/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P23/.project b/P23/.project deleted file mode 100644 index 3cbb703..0000000 --- a/P23/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P23</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P23/.settings/org.eclipse.jdt.core.prefs b/P23/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P23/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P23/src/P23.java b/P23/src/P23.java deleted file mode 100644 index b52a3d2..0000000 --- a/P23/src/P23.java +++ /dev/null @@ -1,47 +0,0 @@ -import java.util.Scanner; - -public class P23 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Please enter M,N (M>=N)"); - System.out.println("Please enter M:"); - int M=input.nextInt(); - System.out.println("Please enter N:"); - int N=input.nextInt(); - - if (M<N) - { - int temp=M; - M=N; - N=temp; - } - - if (M<=0) - M=1; - if (N<=0) - N=1; - - - System.out.println(M + "," + N); - - /// M>=N - - int bmm=1; - for (int x=N;x>0;x--) - { - if (M%x==0 && N%x==0) - { - System.out.println("BMM : " + x); - bmm=x; - break; - } - } - - System.out.println("KMM : " + (M*N)/bmm); - - } - -} diff --git a/P24/.classpath b/P24/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P24/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P24/.gitignore b/P24/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P24/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P24/.project b/P24/.project deleted file mode 100644 index ed2de7f..0000000 --- a/P24/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P24</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P24/.settings/org.eclipse.jdt.core.prefs b/P24/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P24/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P24/src/P24.java b/P24/src/P24.java deleted file mode 100644 index 9df06e9..0000000 --- a/P24/src/P24.java +++ /dev/null @@ -1,25 +0,0 @@ -import java.util.Scanner; - -public class P24 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Please enter n:"); - int n=input.nextInt(); - - - int count=0; - for (int x=1; x<=n; x++) - if (n%x==0) - count++; - - //System.out.println(count); - if (count==2) - System.out.println("Yes"); - else - System.out.println("No"); - } - -} diff --git a/P25P30/.classpath b/P25P30/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P25P30/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P25P30/.gitignore b/P25P30/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P25P30/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P25P30/.project b/P25P30/.project deleted file mode 100644 index 6d0be4e..0000000 --- a/P25P30/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P25P30</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P25P30/.settings/org.eclipse.core.resources.prefs b/P25P30/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index bcfcb79..0000000 --- a/P25P30/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P29.java=UTF-8 -encoding//src/P30.java=UTF-8 diff --git a/P25P30/.settings/org.eclipse.jdt.core.prefs b/P25P30/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P25P30/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P25P30/src/P25.java b/P25P30/src/P25.java deleted file mode 100644 index 0867d0c..0000000 --- a/P25P30/src/P25.java +++ /dev/null @@ -1,21 +0,0 @@ -import java.util.Scanner; - -public class P25 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Please enter n:"); - int n=input.nextInt(); - - int p=1; - for (int x=1;x<=n;x++) - p=p*x; - - - System.out.println(n + "! = " + p); - - - }// end of Main -}// end of Class diff --git a/P25P30/src/P26.java b/P25P30/src/P26.java deleted file mode 100644 index ddf0537..0000000 --- a/P25P30/src/P26.java +++ /dev/null @@ -1,26 +0,0 @@ -import java.util.Scanner; - -public class P26 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - int n=0; - - - int sum=0; - for (int x=1;x<=10;x++) - { - n=input.nextInt(); - - //Calc - - sum = sum + n; - } - - System.out.println("Sum is: " + sum); - System.out.println("Avg is: " + sum/10.0); - - - }// end of Main -}// end of Class diff --git a/P25P30/src/P27.java b/P25P30/src/P27.java deleted file mode 100644 index 60d7b05..0000000 --- a/P25P30/src/P27.java +++ /dev/null @@ -1,25 +0,0 @@ -import java.util.Scanner; - -public class P27 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - int n=0; - - System.out.println("enter number (" + 1 + ") : "); - int min = input.nextInt(); - for (int x=2;x<=100;x++) - { - System.out.println("enter number(" + x + ") : "); - n=input.nextInt(); - - //Calc - if (n<min) - min=n; - } - - System.out.println("Min is: " + min); - - }// end of Main -}// end of Class diff --git a/P25P30/src/P28.java b/P25P30/src/P28.java deleted file mode 100644 index ee4a5bf..0000000 --- a/P25P30/src/P28.java +++ /dev/null @@ -1,25 +0,0 @@ -import java.util.Scanner; - -public class P28 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - int n=0; - - System.out.println("enter number (" + 1 + ") : "); - int max = input.nextInt(); - for (int x=2;x<=100;x++) - { - System.out.println("enter number(" + x + ") : "); - n=input.nextInt(); - - //Calc - if (n>max) - max=n; - } - - System.out.println("Max is: " + max); - - }// end of Main -}// end of Class diff --git a/P25P30/src/P28a.java b/P25P30/src/P28a.java deleted file mode 100644 index 61e2c89..0000000 --- a/P25P30/src/P28a.java +++ /dev/null @@ -1,31 +0,0 @@ -import java.util.Scanner; - -public class P28a { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - int n=0; - - System.out.println("enter number (" + 1 + ") : "); - int max = input.nextInt(); - int min = max; - - - for (int x=2;x<=5;x++) - { - System.out.println("enter number(" + x + ") : "); - n=input.nextInt(); - - //Calc - if (n>max) - max=n; - if (n<min) - min=n; - } - - System.out.println("Max is: " + max); - System.out.println("Min is: " + min); - - }// end of Main -}// end of Class diff --git a/P25P30/src/P29.java b/P25P30/src/P29.java deleted file mode 100644 index d7556d1..0000000 --- a/P25P30/src/P29.java +++ /dev/null @@ -1,51 +0,0 @@ -import java.util.Scanner; - -public class P29 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - int n=0; - int min1=0; //اولین کمترین - int min2=0; // دومین کمترین - - System.out.println("enter number(" + 1 + ") : "); - int n1=input.nextInt(); - System.out.println("enter number(" + 2 + ") : "); - int n2=input.nextInt(); - - if (n1<n2) - { - min1 = n1; - min2 = n2; - } - else - { - min1 = n2; - min2 = n1; - } - - - - for (int x=3;x<=6;x++) - { - System.out.println("enter number(" + x + ") : "); - n=input.nextInt(); - - //Calc - - if (n>min1 && n<min2) - min2=n; - if (n<min1) - { - min2=min1; - min1=n; - } - }// end of for - - System.out.println("Min 1 is: " + min1); - System.out.println("Min 2 is: " + min2); - - - }// end of Main -}// end of Class diff --git a/P25P30/src/P30.java b/P25P30/src/P30.java deleted file mode 100644 index 5c4c96e..0000000 --- a/P25P30/src/P30.java +++ /dev/null @@ -1,51 +0,0 @@ -import java.util.Scanner; - -public class P30 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - int n=0; - int max1=0; //اولین کمترین - int max2=0; // دومین کمترین - - System.out.println("enter number(" + 1 + ") : "); - int n1=input.nextInt(); - System.out.println("enter number(" + 2 + ") : "); - int n2=input.nextInt(); - - if (n1<n2) - { - max1 = n2; - max2 = n1; - } - else - { - max1 = n1; - max2 = n2; - } - - - - for (int x=3;x<=6;x++) - { - System.out.println("enter number(" + x + ") : "); - n=input.nextInt(); - - //Calc - - if (n<max1 && n>max2) - max2=n; - if (n>max1) - { - max2=max1; - max1=n; - } - }// end of for - - System.out.println("Max 1 is: " + max1); - System.out.println("Max 2 is: " + max2); - - - }// end of Main -}// end of Class diff --git a/P31/.classpath b/P31/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P31/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P31/.gitignore b/P31/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P31/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P31/.project b/P31/.project deleted file mode 100644 index 43db3ff..0000000 --- a/P31/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P31</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P31/.settings/org.eclipse.core.resources.prefs b/P31/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 217d46a..0000000 --- a/P31/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P31.java=UTF-8 diff --git a/P31/.settings/org.eclipse.jdt.core.prefs b/P31/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P31/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P31/src/P31.java b/P31/src/P31.java deleted file mode 100644 index 1dd01de..0000000 --- a/P31/src/P31.java +++ /dev/null @@ -1,30 +0,0 @@ -import java.util.Scanner; - -public class P31 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - int CC=0; //برای تعداد اعداد اول - int count=0; - for (int n=1;n<=1000;n++) - { - count=0; - for (int x=1; x<=n; x++) - if (n%x==0) - count++; - - //System.out.println(count); - if (count==2) - { - CC++; - System.out.println(CC + " : " + n); - } - } - - - - } - -} diff --git a/P32-35/.classpath b/P32-35/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P32-35/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P32-35/.gitignore b/P32-35/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P32-35/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P32-35/.project b/P32-35/.project deleted file mode 100644 index 2bd7629..0000000 --- a/P32-35/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P32-35</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P32-35/.settings/org.eclipse.jdt.core.prefs b/P32-35/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P32-35/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P32-35/src/P32.java b/P32-35/src/P32.java deleted file mode 100644 index 6eb7390..0000000 --- a/P32-35/src/P32.java +++ /dev/null @@ -1,18 +0,0 @@ -import java.util.Scanner; - -public class P32 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - int n=input.nextInt(); - - for (int x=1;x<=n;x++) - if (n%x==0 && x>=10 && x<=99) - System.out.println(x); - - - } - -} diff --git a/P32-35/src/P33.java b/P32-35/src/P33.java deleted file mode 100644 index abbd6b3..0000000 --- a/P32-35/src/P33.java +++ /dev/null @@ -1,22 +0,0 @@ -import java.util.Scanner; - -public class P33 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - int n=input.nextInt(); - - int sum=0; - for (int x=1;x<=n;x++) - if (n%x==0 && x>=10 && x<=99) - { - System.out.println(x); - sum = sum +x; - } - - System.out.println("sum is:" + sum); - } - -} diff --git a/P32-35/src/P34.java b/P32-35/src/P34.java deleted file mode 100644 index 79dc068..0000000 --- a/P32-35/src/P34.java +++ /dev/null @@ -1,25 +0,0 @@ -import java.util.Scanner; - -public class P34 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - int n=input.nextInt(); - - int sum=0; - int count=0; - for (int x=1;x<=n;x++) - if (n%x==0 && x>=10 && x<=99) - { - System.out.println(x); - sum = sum +x; - count++; - } - - System.out.println("sum is:" + sum); - System.out.println("count is:" + count); - } - -} diff --git a/P32-35/src/P35.java b/P32-35/src/P35.java deleted file mode 100644 index 5bfad7f..0000000 --- a/P32-35/src/P35.java +++ /dev/null @@ -1,27 +0,0 @@ -import java.util.Scanner; - -public class P35 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - int n=input.nextInt(); - - int sum=0; - int count=0; - for (int x=1;x<=n;x++) - if (n%x==0 && x>=10 && x<=99) - { - System.out.println(x); - sum = sum +x; - count++; - } - - System.out.println("sum is:" + sum); - System.out.println("count is:" + count); - System.out.println("Avg is:" + (1.0*sum/count)); - - } - -} diff --git a/P36P37/.classpath b/P36P37/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P36P37/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P36P37/.gitignore b/P36P37/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P36P37/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P36P37/.project b/P36P37/.project deleted file mode 100644 index af0044e..0000000 --- a/P36P37/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P36P37</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P36P37/.settings/org.eclipse.jdt.core.prefs b/P36P37/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P36P37/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P36P37/src/P36.java b/P36P37/src/P36.java deleted file mode 100644 index 301f017..0000000 --- a/P36P37/src/P36.java +++ /dev/null @@ -1,34 +0,0 @@ -import java.util.Scanner; - -public class P36 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - - - int n=0; - int CC=0; - - for (int y=1;y<=100;y++) - { - n=input.nextInt(); - - //Calc - int count=0; - for (int x=1; x<=n; x++) - if (n%x==0) - count++; - - if (count==2) - CC++; - } - - System.out.println("Prime count is: " + CC); - - - - } - -} diff --git a/P36P37/src/P37.java b/P36P37/src/P37.java deleted file mode 100644 index be559fd..0000000 --- a/P36P37/src/P37.java +++ /dev/null @@ -1,34 +0,0 @@ -import java.util.Scanner; - -public class P37 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - - - int n=0; - int sum=0; - - for (int y=1;y<=100;y++) - { - n=input.nextInt(); - - //Calc - int count=0; - for (int x=1; x<=n; x++) - if (n%x==0) - count++; - - if (count==2) - sum =sum +n; - } - - System.out.println("Prime sum is: " + sum); - - - - } - -} diff --git a/P38/.classpath b/P38/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P38/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P38/.gitignore b/P38/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P38/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P38/.project b/P38/.project deleted file mode 100644 index a00aa0b..0000000 --- a/P38/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P38</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P38/.settings/org.eclipse.jdt.core.prefs b/P38/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P38/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P38/src/P38.java b/P38/src/P38.java deleted file mode 100644 index 6b6271e..0000000 --- a/P38/src/P38.java +++ /dev/null @@ -1,29 +0,0 @@ -import java.util.Scanner; - -public class P38 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - - - int n=0; - int CC=0; - - for (int y=1;y<=10;y++) - { - n=input.nextInt(); - - //Calc - if (n%2==1) - CC++; - } - - System.out.println("Odd count is: " + CC); - - - - } - -} diff --git a/P39/.classpath b/P39/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P39/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P39/.gitignore b/P39/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P39/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P39/.project b/P39/.project deleted file mode 100644 index f1ef9ee..0000000 --- a/P39/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P39</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P39/.settings/org.eclipse.core.resources.prefs b/P39/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 5606e0e..0000000 --- a/P39/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P39.java=UTF-8 diff --git a/P39/.settings/org.eclipse.jdt.core.prefs b/P39/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P39/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P39/src/P39.java b/P39/src/P39.java deleted file mode 100644 index 9e3d7f0..0000000 --- a/P39/src/P39.java +++ /dev/null @@ -1,34 +0,0 @@ -import java.util.Scanner; - -public class P39 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - int n=0; - int Max=0; - for (int x=1;x<=100;x++) - { - n=input.nextInt(); - - //Calc - // مقسوم علیه های n - int count=0; - for (int y=1;y<=n;y++) - if (n%y==0) - count++; - - - if (count>Max) - Max=count; - - System.out.println("n:" + n + ", count:" + count + " Max:" +Max); - } - - System.out.println("Max:" + Max); - - - } - -} diff --git a/P41P60P63/.classpath b/P41P60P63/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P41P60P63/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P41P60P63/.gitignore b/P41P60P63/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P41P60P63/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P41P60P63/.project b/P41P60P63/.project deleted file mode 100644 index a25acc4..0000000 --- a/P41P60P63/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P41P60P63</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P41P60P63/.settings/org.eclipse.core.resources.prefs b/P41P60P63/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index e8940be..0000000 --- a/P41P60P63/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,8 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P41.java=UTF-8 -encoding//src/P41a.java=UTF-8 -encoding//src/P41b.java=UTF-8 -encoding//src/P60.java=UTF-8 -encoding//src/P61.java=UTF-8 -encoding//src/P62.java=UTF-8 -encoding//src/P63.java=UTF-8 diff --git a/P41P60P63/.settings/org.eclipse.jdt.core.prefs b/P41P60P63/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P41P60P63/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P41P60P63/src/P41.java b/P41P60P63/src/P41.java deleted file mode 100644 index 95abd78..0000000 --- a/P41P60P63/src/P41.java +++ /dev/null @@ -1,42 +0,0 @@ -/** -* P41 : سری فیبوناتچی 50 جمله اول -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/07 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P41 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - - long a=1; //عدد اول در سری فیبوناچی - long b=1; //عدد دوم در سری فیبوناچی - System.out.println("1: " + a); - System.out.println("2: " + b); - - long c=0; //عدد جمع دوتای قبلی در سری فیبوناچی - int count=3; - - while (count<=50) - { - c=a+b; - System.out.println(count + ": " + c); - - a=b; - b=c; - - count++; - } - - - - }// end of main -}// end of class diff --git a/P41P60P63/src/P41a.java b/P41P60P63/src/P41a.java deleted file mode 100644 index ee9e840..0000000 --- a/P41P60P63/src/P41a.java +++ /dev/null @@ -1,39 +0,0 @@ -/** -* P41a : سری فیبوناتچی کمتر از 1000 -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/07 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P41a -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - - int a=1; //عدد اول در سری فیبوناچی - int b=1; //عدد دوم در سری فیبوناچی - System.out.println(a); - System.out.println(b); - - int c=0; //عدد جمع دوتای قبلی در سری فیبوناچی - - while ((a+b)<1000) - { - c=a+b; - System.out.println(c); - - a=b; - b=c; - } - - - - }// end of main -}// end of class diff --git a/P41P60P63/src/P41b.java b/P41P60P63/src/P41b.java deleted file mode 100644 index 43e941b..0000000 --- a/P41P60P63/src/P41b.java +++ /dev/null @@ -1,46 +0,0 @@ -/** -* P41b : میانگین اعداد سری فیبوناتچی کمتر از 1000 -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/07 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P41b -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - - int a=1; //عدد اول در سری فیبوناچی - int b=1; //عدد دوم در سری فیبوناچی - System.out.println(a); - System.out.println(b); - - int c=0; //عدد جمع دوتای قبلی در سری فیبوناچی - int count=2; - int sum=2; - while ((a+b)<1000) - { - c=a+b; - System.out.println(c); - - a=b; - b=c; - - count++; - sum=sum+c; - } - - System.out.println("Count is: " + count); - System.out.println("Sum is: " + sum); - System.out.println("Avg is: " + 1.0* sum/count); - - - }// end of main -}// end of class diff --git a/P41P60P63/src/P60.java b/P41P60P63/src/P60.java deleted file mode 100644 index 84dec7b..0000000 --- a/P41P60P63/src/P60.java +++ /dev/null @@ -1,61 +0,0 @@ -/** -* P60 : 20 امین عدد اول سری فیبوناچی -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/07 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P60 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - - long a=1; //عدد اول در سری فیبوناچی - long b=1; //عدد دوم در سری فیبوناچی - System.out.println("1: " + a); - System.out.println("2: " + b); - - long c=0; //عدد جمع دوتای قبلی در سری فیبوناچی - int count=3; //برای شمارش اعداد فیبوناچی - int primeCount=0; //برای شمارش تعداد اعداد اول - - while (primeCount<10) - { - c=a+b; - - System.out.print(count + ": " + c); - - // بررسی اول بودن c - int cc=0; // برای شمارش تعداد مقسوم علیه های c - for (long x=2;x<=Math.sqrt(c);x++) - if (c%x==0) - { - cc++; - break; - } - - if (cc==0) - { - primeCount++; - System.out.print(" is Prime" + primeCount); - - } - - System.out.println(); - a=b; - b=c; - - count++; - } - - - - }// end of main -}// end of class diff --git a/P41P60P63/src/P61.java b/P41P60P63/src/P61.java deleted file mode 100644 index 5c80402..0000000 --- a/P41P60P63/src/P61.java +++ /dev/null @@ -1,61 +0,0 @@ -/** -* P61 : 12 امین عدد اول سری فیبوناچی -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/07 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P61 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - - long a=1; //عدد اول در سری فیبوناچی - long b=1; //عدد دوم در سری فیبوناچی - //System.out.println("1: " + a); - //System.out.println("2: " + b); - - long c=0; //عدد جمع دوتای قبلی در سری فیبوناچی - int count=3; //برای شمارش اعداد فیبوناچی - int primeCount=0; //برای شمارش تعداد اعداد اول - - while (primeCount<12) - { - c=a+b; - - //System.out.print(count + ": " + c); - - // بررسی اول بودن c - int cc=0; // برای شمارش تعداد مقسوم علیه های c - for (long x=2;x<=Math.sqrt(c);x++) - if (c%x==0) - { - cc++; - break; - } - - if (cc==0) - { - primeCount++; - System.out.print(count + ": " + c); - System.out.print(" is Prime" + primeCount); - System.out.println(); - } - - a=b; - b=c; - - count++; - } - - - - }// end of main -}// end of class diff --git a/P41P60P63/src/P62.java b/P41P60P63/src/P62.java deleted file mode 100644 index fabea6a..0000000 --- a/P41P60P63/src/P62.java +++ /dev/null @@ -1,47 +0,0 @@ -/** -* P62 : تشخیص وجود یک عدد در سری فیبوناچی -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/07 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P62 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.print("Enter n: "); - int n= input.nextInt(); // عددی که قرار است بررسی شود - - - - // بررسی وجود n در سری فیبوناچی - - long a=1; //عدد اول در سری فیبوناچی - long b=1; //عدد دوم در سری فیبوناچی - long c=0; //عدد جمع دوتای قبلی در سری فیبوناچی - int count=3; - while (c<n && n!=1) - { - c=a+b; - System.out.println(count + ": " + c); - a=b; - b=c; - count++; - } - if (c==n || n==1) - System.out.println("yes"); - else if (c>n) - System.out.println("no"); - - - - - }// end of main -}// end of class diff --git a/P41P60P63/src/P63.java b/P41P60P63/src/P63.java deleted file mode 100644 index daf7c0d..0000000 --- a/P41P60P63/src/P63.java +++ /dev/null @@ -1,61 +0,0 @@ -/** -* P63 : تشخیص وجود یک عدد در سری فیبوناچی در بین 100 عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/07 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P63 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - int n=0;// عددی که هر مرحله از کاربر دریافت میشود - - for (int x=1;x<=10;x++) - { - // گرفتن n - System.out.println("Enter n: "); - n=input.nextInt(); - - // محاسبات روی n - - // بررسی وجود n در سری فیبوناچی - long a=1; //عدد اول در سری فیبوناچی - long b=1; //عدد دوم در سری فیبوناچی - long c=0; //عدد جمع دوتای قبلی در سری فیبوناچی - int count=3; - while (c<n && n!=1) - { - c=a+b; - //System.out.println(count + ": " + c); - a=b; - b=c; - count++; - } - if (c==n || n==1) - System.out.println("yes"); - else if (c>n) - System.out.println("no"); - - - }// end of for x - - - - - - - - - - - - }// end of main -}// end of class diff --git a/P42P56/.classpath b/P42P56/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P42P56/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P42P56/.gitignore b/P42P56/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P42P56/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P42P56/.project b/P42P56/.project deleted file mode 100644 index ebb7258..0000000 --- a/P42P56/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P42P56</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P42P56/.settings/org.eclipse.core.resources.prefs b/P42P56/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index e290b5c..0000000 --- a/P42P56/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,16 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P42.java=UTF-8 -encoding//src/P43.java=UTF-8 -encoding//src/P44.java=UTF-8 -encoding//src/P45.java=UTF-8 -encoding//src/P46.java=UTF-8 -encoding//src/P47.java=UTF-8 -encoding//src/P48.java=UTF-8 -encoding//src/P49.java=UTF-8 -encoding//src/P50.java=UTF-8 -encoding//src/P51.java=UTF-8 -encoding//src/P52.java=UTF-8 -encoding//src/P53.java=UTF-8 -encoding//src/P54.java=UTF-8 -encoding//src/P55.java=UTF-8 -encoding//src/P56.java=UTF-8 diff --git a/P42P56/.settings/org.eclipse.jdt.core.prefs b/P42P56/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P42P56/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P42P56/src/P42.java b/P42P56/src/P42.java deleted file mode 100644 index 5a5ef79..0000000 --- a/P42P56/src/P42.java +++ /dev/null @@ -1,40 +0,0 @@ -/** -* P42 : مجموع ارقام یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/03 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P42 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n: "); - int n=input.nextInt(); // عددی که از کاربر گرفته میشود - - int sum=0; //برای حاصل جمع ارقام - while (n>0) - { - int r=n%10; //برای رقم یکان - - // محاسبات روی رقم یکان عدد - sum=sum+r; - - // حذف رقم یکان - n=n/10; - }// end of while - - // چاپ نتیجه - System.out.println("Sum is: " + sum); - - - - }// end of main -}// end of class diff --git a/P42P56/src/P43.java b/P42P56/src/P43.java deleted file mode 100644 index fec1c6f..0000000 --- a/P42P56/src/P43.java +++ /dev/null @@ -1,41 +0,0 @@ -/** -* P43 : مجموع ارقام زوج یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/03 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P43 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n: "); - int n=input.nextInt(); // عددی که از کاربر گرفته میشود - - int sum=0; //برای حاصل جمع ارقام - while (n>0) - { - int r=n%10; //برای رقم یکان - - // محاسبات روی رقم یکان عدد - if (r%2==0) - sum=sum+r; - - // حذف رقم یکان - n=n/10; - }// end of while - - // چاپ نتیجه - System.out.println("Sum is: " + sum); - - - - }// end of main -}// end of class diff --git a/P42P56/src/P44.java b/P42P56/src/P44.java deleted file mode 100644 index 5bcbb65..0000000 --- a/P42P56/src/P44.java +++ /dev/null @@ -1,41 +0,0 @@ -/** -* P44 : مجموع ارقام فرد یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/03 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P44 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n: "); - int n=input.nextInt(); // عددی که از کاربر گرفته میشود - - int sum=0; //برای حاصل جمع ارقام - while (n>0) - { - int r=n%10; //برای رقم یکان - - // محاسبات روی رقم یکان عدد - if (r%2==1) - sum=sum+r; - - // حذف رقم یکان - n=n/10; - }// end of while - - // چاپ نتیجه - System.out.println("Sum is: " + sum); - - - - }// end of main -}// end of class diff --git a/P42P56/src/P45.java b/P42P56/src/P45.java deleted file mode 100644 index cf18400..0000000 --- a/P42P56/src/P45.java +++ /dev/null @@ -1,40 +0,0 @@ -/** -* P45 : تعداد ارقام یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/03 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P45 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n: "); - int n=input.nextInt(); // عددی که از کاربر گرفته میشود - - int count=0; //ارقام تعداد - while (n>0) - { - int r=n%10; //برای رقم یکان - - // محاسبات روی رقم یکان عدد - count++; - - // حذف رقم یکان - n=n/10; - }// end of while - - // چاپ نتیجه - System.out.println("Count is: " + count); - - - - }// end of main -}// end of class diff --git a/P42P56/src/P46.java b/P42P56/src/P46.java deleted file mode 100644 index 59eb712..0000000 --- a/P42P56/src/P46.java +++ /dev/null @@ -1,41 +0,0 @@ -/** -* P46 : تعداد ارقام زوج یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/03 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P46 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n: "); - int n=input.nextInt(); // عددی که از کاربر گرفته میشود - - int count=0; //ارقام تعداد - while (n>0) - { - int r=n%10; //برای رقم یکان - - // محاسبات روی رقم یکان عدد - if (r%2==0) - count++; - - // حذف رقم یکان - n=n/10; - }// end of while - - // چاپ نتیجه - System.out.println("Count is: " + count); - - - - }// end of main -}// end of class diff --git a/P42P56/src/P47.java b/P42P56/src/P47.java deleted file mode 100644 index 04a6139..0000000 --- a/P42P56/src/P47.java +++ /dev/null @@ -1,41 +0,0 @@ -/** -* P47 : تعداد ارقام فرد یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/03 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P47 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n: "); - int n=input.nextInt(); // عددی که از کاربر گرفته میشود - - int count=0; //ارقام تعداد - while (n>0) - { - int r=n%10; //برای رقم یکان - - // محاسبات روی رقم یکان عدد - if (r%2==1) - count++; - - // حذف رقم یکان - n=n/10; - }// end of while - - // چاپ نتیجه - System.out.println("Count is: " + count); - - - - }// end of main -}// end of class diff --git a/P42P56/src/P48.java b/P42P56/src/P48.java deleted file mode 100644 index d0dfb0d..0000000 --- a/P42P56/src/P48.java +++ /dev/null @@ -1,40 +0,0 @@ -/** -* P48 : حاصل ضرب ارقام یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/03 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P48 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n: "); - int n=input.nextInt(); // عددی که از کاربر گرفته میشود - - int p=1; // برای حاصل ضرب ارقام - while (n>0) - { - int r=n%10; //برای رقم یکان - - // محاسبات روی رقم یکان عدد - p=p*r; - - // حذف رقم یکان - n=n/10; - }// end of while - - // چاپ نتیجه - System.out.println("Product is: " + p); - - - - }// end of main -}// end of class diff --git a/P42P56/src/P49.java b/P42P56/src/P49.java deleted file mode 100644 index 301caeb..0000000 --- a/P42P56/src/P49.java +++ /dev/null @@ -1,41 +0,0 @@ -/** -* P49 : حاصل ضرب ارقام روج یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/03 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P49 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n: "); - int n=input.nextInt(); // عددی که از کاربر گرفته میشود - - int p=1; // برای حاصل ضرب ارقام - while (n>0) - { - int r=n%10; //برای رقم یکان - - // محاسبات روی رقم یکان عدد - if (r%2==0) - p=p*r; - - // حذف رقم یکان - n=n/10; - }// end of while - - // چاپ نتیجه - System.out.println("Product is: " + p); - - - - }// end of main -}// end of class diff --git a/P42P56/src/P50.java b/P42P56/src/P50.java deleted file mode 100644 index 354637e..0000000 --- a/P42P56/src/P50.java +++ /dev/null @@ -1,49 +0,0 @@ -/** -* P50 : حاصل ضرب ارقام فرد یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/03 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P50 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n: "); - int n=input.nextInt(); // عددی که از کاربر گرفته میشود - - int p=1; // برای حاصل ضرب ارقام - int flag=0; // برای بررسی وجود رقم فرد - while (n>0) - { - int r=n%10; //برای رقم یکان - - // محاسبات روی رقم یکان عدد - if (r%2!=0) - { - p=p*r; - flag=1; - } - - // حذف رقم یکان - n=n/10; - }// end of while - - - // چاپ نتیجه - if (flag==0) // یعنی رقم فردی وجود نداشته است - System.out.println("رقم فردی پیدا نشد"); - else - System.out.println("Product is: " + p); - - - - }// end of main -}// end of class diff --git a/P42P56/src/P51.java b/P42P56/src/P51.java deleted file mode 100644 index 67bb3c8..0000000 --- a/P42P56/src/P51.java +++ /dev/null @@ -1,47 +0,0 @@ -/** -* P51 : میانگین ارقام یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/03 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P51 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n: "); - int n=input.nextInt(); // عددی که از کاربر گرفته میشود - - int sum=0; //برای مجموع ارقام - int count=0; //برای تعداد ارقام عدد - while (n>0) - { - int r=n%10; //برای رقم یکان - - // محاسبات روی رقم یکان عدد - count++; - sum=sum+r; - - - // حذف رقم یکان - n=n/10; - }// end of while - - - // چاپ نتیجه - if (count==0) - System.out.println("Avg is: 0"); - else - System.out.println("Avg is: " + 1.0*sum/count); - - - - }// end of main -}// end of class diff --git a/P42P56/src/P52.java b/P42P56/src/P52.java deleted file mode 100644 index 080ea29..0000000 --- a/P42P56/src/P52.java +++ /dev/null @@ -1,50 +0,0 @@ -/** -* P52 : میانگین ارقام زوج یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/03 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P52 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n: "); - int n=input.nextInt(); // عددی که از کاربر گرفته میشود - - int sum=0; //برای مجموع ارقام - int count=0; //برای تعداد ارقام عدد - while (n>0) - { - int r=n%10; //برای رقم یکان - - // محاسبات روی رقم یکان عدد - if (r%2==0) - { - count++; - sum=sum+r; - } - - - // حذف رقم یکان - n=n/10; - }// end of while - - - // چاپ نتیجه - if (count==0) - System.out.println("رقم زوجی پیدا نکرد"); - else - System.out.println("Avg is: " + 1.0*sum/count); - - - - }// end of main -}// end of class diff --git a/P42P56/src/P53.java b/P42P56/src/P53.java deleted file mode 100644 index c8d1380..0000000 --- a/P42P56/src/P53.java +++ /dev/null @@ -1,50 +0,0 @@ -/** -* P53 : میانگین ارقام فرد یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/03 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P53 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n: "); - int n=input.nextInt(); // عددی که از کاربر گرفته میشود - - int sum=0; //برای مجموع ارقام - int count=0; //برای تعداد ارقام عدد - while (n>0) - { - int r=n%10; //برای رقم یکان - - // محاسبات روی رقم یکان عدد - if (r%2==1) - { - count++; - sum=sum+r; - } - - - // حذف رقم یکان - n=n/10; - }// end of while - - - // چاپ نتیجه - if (count==0) - System.out.println("رقم فردی پیدا نکرد"); - else - System.out.println("Avg is: " + 1.0*sum/count); - - - - }// end of main -}// end of class diff --git a/P42P56/src/P54.java b/P42P56/src/P54.java deleted file mode 100644 index d435536..0000000 --- a/P42P56/src/P54.java +++ /dev/null @@ -1,41 +0,0 @@ -/** -* P54 : مقلوب یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/03 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P54 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n: "); - int n=input.nextInt(); // عددی که از کاربر گرفته میشود - - int p=0; - while (n>0) - { - int r=n%10; //برای رقم یکان - - // محاسبات روی رقم یکان عدد - //System.out.print(r); - p=p*10+r; - - // حذف رقم یکان - n=n/10; - }// end of while - - - // چاپ نتیجه - System.out.println(p); - - - }// end of main -}// end of class diff --git a/P42P56/src/P55.java b/P42P56/src/P55.java deleted file mode 100644 index fa1c8ac..0000000 --- a/P42P56/src/P55.java +++ /dev/null @@ -1,42 +0,0 @@ -/** -* P55 : مقلوب ارقام فرد یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/03 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P55 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n: "); - int n=input.nextInt(); // عددی که از کاربر گرفته میشود - - int p=0; - while (n>0) - { - int r=n%10; //برای رقم یکان - - // محاسبات روی رقم یکان عدد - //System.out.print(r); - if (r%2==1) - p=p*10+r; - - // حذف رقم یکان - n=n/10; - }// end of while - - - // چاپ نتیجه - System.out.println(p); - - - }// end of main -}// end of class diff --git a/P42P56/src/P56.java b/P42P56/src/P56.java deleted file mode 100644 index e7edebb..0000000 --- a/P42P56/src/P56.java +++ /dev/null @@ -1,42 +0,0 @@ -/** -* P56 : مقلوب ارقام زوج یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/03 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P56 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n: "); - int n=input.nextInt(); // عددی که از کاربر گرفته میشود - - int p=0; - while (n>0) - { - int r=n%10; //برای رقم یکان - - // محاسبات روی رقم یکان عدد - //System.out.print(r); - if (r%2==0) - p=p*10+r; - - // حذف رقم یکان - n=n/10; - }// end of while - - - // چاپ نتیجه - System.out.println(p); - - - }// end of main -}// end of class diff --git a/P4P5P6/.classpath b/P4P5P6/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P4P5P6/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P4P5P6/.gitignore b/P4P5P6/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P4P5P6/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P4P5P6/.project b/P4P5P6/.project deleted file mode 100644 index e473a92..0000000 --- a/P4P5P6/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P4P5P6</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P4P5P6/.settings/org.eclipse.jdt.core.prefs b/P4P5P6/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P4P5P6/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P4P5P6/src/P4.java b/P4P5P6/src/P4.java deleted file mode 100644 index 0d9e1a0..0000000 --- a/P4P5P6/src/P4.java +++ /dev/null @@ -1,25 +0,0 @@ - -import java.util.Scanner; -public class P4 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.print("Please enter n: "); - int n=input.nextInt(); - - - // System.out.println(Math.abs(n)); - - //if (n<0) - // n=-n; - //System.out.println(n); - - - // n*n = n^2 >=0 - System.out.println((int) Math.sqrt(n*n)); - - - } -} diff --git a/P4P5P6/src/P5.java b/P4P5P6/src/P5.java deleted file mode 100644 index cd5a2b4..0000000 --- a/P4P5P6/src/P5.java +++ /dev/null @@ -1,24 +0,0 @@ - -import java.util.Scanner; -public class P5 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.print("Please enter n1: "); - int n1=input.nextInt(); - - System.out.print("Please enter n2: "); - int n2=input.nextInt(); - - - //System.out.println(Math.min(n1,n2)); - - //min (n1,n2) = (|n1+n2| - |n1-n2|)/2 - - int min = (Math.abs(n1+n2)-Math.abs(n1-n2))/2; - - System.out.println(min); - } -} diff --git a/P4P5P6/src/P6.java b/P4P5P6/src/P6.java deleted file mode 100644 index 44d93c6..0000000 --- a/P4P5P6/src/P6.java +++ /dev/null @@ -1,24 +0,0 @@ - -import java.util.Scanner; -public class P6 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.print("Please enter n1: "); - int n1=input.nextInt(); - - System.out.print("Please enter n2: "); - int n2=input.nextInt(); - - - //System.out.println(Math.min(n1,n2)); - - //max(n1,n2) = (|n1+n2| + |n1-n2|)/2 - - int max = (Math.abs(n1+n2)+Math.abs(n1-n2))/2; - - System.out.println(max); - } -} diff --git a/P50/.classpath b/P50/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P50/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P50/.gitignore b/P50/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P50/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P50/.project b/P50/.project deleted file mode 100644 index 44ccd39..0000000 --- a/P50/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P50</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P50/.settings/org.eclipse.core.resources.prefs b/P50/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index aa1235a..0000000 --- a/P50/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P50.java=UTF-8 diff --git a/P50/.settings/org.eclipse.jdt.core.prefs b/P50/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P50/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P50/src/P50.java b/P50/src/P50.java deleted file mode 100644 index f608206..0000000 --- a/P50/src/P50.java +++ /dev/null @@ -1,52 +0,0 @@ -/** -* P50 : 50 امین عدد اول -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/02 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P50 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - - int primecount=0; //برای شمارش تعداد اعداد اول - int n=0; //عددی که هر بار اول بودن آنرا بررسی میکنیم - - while (primecount<50) - { - n++; - - // بررسی اول بودن عدد n - int count=0; //برای تعداد مقسوم علیه ها - for (int x=1;x<=n;x++) - if (n%x==0) - count++; - if (count==2) - { - primecount++; - } - - }//end of while primecount - - System.out.println(n); - - - - /* - * for (int n=1;n<=100000;n++) { // بررسی اول بودن عدد n int count=0; //برای - * تعداد مقسوم علیه ها for (int x=1;x<=n;x++) if (n%x==0) count++; if (count==2) - * { primecount++; if (primecount==500) { System.out.println(primecount + ":" + - * n); break; } } }// end of for n - */ - - - }// end of main -}// end of class diff --git a/P57P58/.classpath b/P57P58/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P57P58/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P57P58/.gitignore b/P57P58/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P57P58/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P57P58/.project b/P57P58/.project deleted file mode 100644 index e682ccf..0000000 --- a/P57P58/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P57P58</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P57P58/.settings/org.eclipse.core.resources.prefs b/P57P58/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 65a0bfc..0000000 --- a/P57P58/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P57P58.java=UTF-8 diff --git a/P57P58/.settings/org.eclipse.jdt.core.prefs b/P57P58/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P57P58/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P57P58/src/P57P58.java b/P57P58/src/P57P58.java deleted file mode 100644 index dbbe832..0000000 --- a/P57P58/src/P57P58.java +++ /dev/null @@ -1,53 +0,0 @@ -/** -* P5758 : ب.م.م و ک.م.م دو عدد با تکرار نامعین -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/15 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P57P58 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - // گرفتن دو عدد از کاربر - int m=0; // عدد اول - int n; // عدد دوم - - System.out.println("Enter m: "); - m=input.nextInt(); - System.out.println("Enter n: "); - n=input.nextInt(); - - if (m<n) - { - int temp=m; - m=n; - n=temp; - } - int m1=m; - int n1=n; - //System.out.println(m + "," + n); - - while (m%n != 0) - { - int r = m%n; - m=n; - n=r; - } - - System.out.println("BMM is: " + n); - - System.out.println("KMM is:" + m1*n1 / n); - - - - - }// end of main -}// end of class diff --git a/P59/.classpath b/P59/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P59/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P59/.gitignore b/P59/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P59/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P59/.project b/P59/.project deleted file mode 100644 index 58bb8f2..0000000 --- a/P59/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P59</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P59/.settings/org.eclipse.core.resources.prefs b/P59/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 3405d34..0000000 --- a/P59/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P59.java=UTF-8 diff --git a/P59/.settings/org.eclipse.jdt.core.prefs b/P59/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P59/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P59/src/P59.java b/P59/src/P59.java deleted file mode 100644 index c359893..0000000 --- a/P59/src/P59.java +++ /dev/null @@ -1,50 +0,0 @@ -/** -* P59 : تجزیه یک عدد به عوامل اول -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/15 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P59 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n:"); - int n=input.nextInt(); // عددی که قرار هست به عوامل اول تجزیه شود - - int k=2; // عددی که هر بار n بر آن تقسیم میشود - while (n>1) - { - // تقسیمات متوالی n بر k - int count=0; - while (n%k==0) - { - n=n/k; - count++; - } - - // چاپ نتیجه تا این بخش از محاسبه - if (count == 1 && n>1) - System.out.print(k + "*"); - else if (count == 1 && n==1) - System.out.print(k); - else if (count != 0 && n>1) - System.out.print(k + "^" + count + "*"); - else if (count != 0 && n==1) - System.out.print(k + "^" + count); - - k++; - } - - - - - }// end of main -}// end of class diff --git a/P64P67/.classpath b/P64P67/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P64P67/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P64P67/.gitignore b/P64P67/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P64P67/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P64P67/.project b/P64P67/.project deleted file mode 100644 index 0d58a75..0000000 --- a/P64P67/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P64P67</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P64P67/.settings/org.eclipse.core.resources.prefs b/P64P67/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index f2548e7..0000000 --- a/P64P67/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P64.java=UTF-8 -encoding//src/P65.java=UTF-8 -encoding//src/P66.java=UTF-8 -encoding//src/P67.java=UTF-8 diff --git a/P64P67/.settings/org.eclipse.jdt.core.prefs b/P64P67/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P64P67/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P64P67/src/P64.java b/P64P67/src/P64.java deleted file mode 100644 index dc58395..0000000 --- a/P64P67/src/P64.java +++ /dev/null @@ -1,54 +0,0 @@ -/** -* P64 : حاصل جمع کل ارقام 100 عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/15 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P64 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - int n=0;// عددی که هر مرحله از کاربر دریافت میشود - - - int sumall=0; - for (int x=1;x<=100;x++) - { - // گرفتن n - System.out.println("Enter n: "); - n=input.nextInt(); - - // محاسبات روی n - // حاصل جمع ارقام n - int sum=0; // برای محاسبه مجموع ارقام n - while (n>0) - { - sum = sum + n%10; //جمع رقم یکان n روی sum - n=n/10; //حذف رقم یکان n - } - - sumall = sumall+sum; - }// end of for x - - - System.out.println("Sum of All is:" + sumall); - - - - - - - - - - - }// end of main -}// end of class diff --git a/P64P67/src/P65.java b/P64P67/src/P65.java deleted file mode 100644 index ff2b00d..0000000 --- a/P64P67/src/P65.java +++ /dev/null @@ -1,55 +0,0 @@ -/** -* P65 : تعداد کل ارقام 100 عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/15 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P65 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - int n=0;// عددی که هر مرحله از کاربر دریافت میشود - - - int countall=0; - for (int x=1;x<=100;x++) - { - // گرفتن n - System.out.println("Enter n: "); - n=input.nextInt(); - - // محاسبات روی n - // تعداد ارقام n - int count=0; // برای محاسبه تعداد ارقام n - while (n>0) - { - //sum = sum + n%10; //جمع رقم یکان n روی sum - count++; - n=n/10; //حذف رقم یکان n - } - - countall = countall+count; - }// end of for x - - - System.out.println("Count of All is:" + countall); - - - - - - - - - - - }// end of main -}// end of class diff --git a/P64P67/src/P66.java b/P64P67/src/P66.java deleted file mode 100644 index f82d1af..0000000 --- a/P64P67/src/P66.java +++ /dev/null @@ -1,51 +0,0 @@ -/** -* P66 : میانگین میانگین ارقام 100 عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/15 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P66 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - int n=0;// عددی که هر مرحله از کاربر دریافت میشود - - - double sumAvg = 0.0; // جمع میانگینهای n های دریافتی از کاربر - for (int x=1;x<=100;x++) - { - // گرفتن n - System.out.println("Enter n (n>0): "); - n=input.nextInt(); - - // محاسبات روی n - // تعداد ارقام n - int count=0; // برای محاسبه تعداد ارقام n - int sum=0; // برای محاسبه مجموع ارقام n - while (n>0) - { - sum = sum + n%10; //جمع رقم یکان n روی sum - count++; - n=n/10; //حذف رقم یکان n - } - - double avg= 1.0 * sum / count; //میانگین ارقام عدد n - sumAvg += avg; //sumAvg = sumAvg + avg; - - }// end of for x - - System.out.println("AllAvg is: " + sumAvg/100); - - - - - }// end of main -}// end of class diff --git a/P64P67/src/P67.java b/P64P67/src/P67.java deleted file mode 100644 index 62b11a0..0000000 --- a/P64P67/src/P67.java +++ /dev/null @@ -1,52 +0,0 @@ -/** -* P67 : در بین 100 عدد تعداد اعدادی را که با مقلوبشان برابرند -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/15 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P67 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - int n=0;// عددی که هر مرحله از کاربر دریافت میشود - - - double sumAvg = 0.0; // جمع میانگینهای n های دریافتی از کاربر - int count=0; // تعداد اعدادی را که با مقلوبشان برابرند - - for (int x=1;x<=100;x++) - { - // گرفتن n - System.out.println("Enter n (n>0): "); - n=input.nextInt(); - int n1=n; - - // محاسبات روی n - // محاسبه مقلوب عدد n - int p=0; // مقلوب n - while (n>0) - { - int r=n%10; //برای رقم یکان - p=p*10+r; - // حذف رقم یکان - n=n/10; - }// end of while - - // p مقلوب n را دارد - if (p==n1) - count++; - }// end of for x - System.out.println("Count is: " + count); - - - - }// end of main -}// end of class diff --git a/P68/.classpath b/P68/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P68/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P68/.gitignore b/P68/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P68/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P68/.project b/P68/.project deleted file mode 100644 index 7e19348..0000000 --- a/P68/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P68</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P68/.settings/org.eclipse.core.resources.prefs b/P68/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 589f0dc..0000000 --- a/P68/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P68.java=UTF-8 diff --git a/P68/.settings/org.eclipse.jdt.core.prefs b/P68/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P68/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P68/src/P68.java b/P68/src/P68.java deleted file mode 100644 index 4b71cb0..0000000 --- a/P68/src/P68.java +++ /dev/null @@ -1,52 +0,0 @@ -/** -* P68 : حذف صفرهای یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/16 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P68 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n: "); - int n=input.nextInt(); // عدد ورودی - - int S=0; - int P=1; - while (n>0) - { - //محاسبات من روی ارقام - if (n%10 != 0) - { - S = S + P* (n%10); - P=P*10; - } - - n=n/10; // حذف رقم یکان - } - - System.out.println(S); - - - - - }// end of main -}// end of class - - - - - - - - - diff --git a/P69P71/.classpath b/P69P71/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P69P71/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P69P71/.gitignore b/P69P71/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P69P71/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P69P71/.project b/P69P71/.project deleted file mode 100644 index 9ac7cd0..0000000 --- a/P69P71/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P69P71</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P69P71/.settings/org.eclipse.core.resources.prefs b/P69P71/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 0458217..0000000 --- a/P69P71/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,4 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P69.java=UTF-8 -encoding//src/P70.java=UTF-8 -encoding//src/P71.java=UTF-8 diff --git a/P69P71/.settings/org.eclipse.jdt.core.prefs b/P69P71/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P69P71/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P69P71/src/P69.java b/P69P71/src/P69.java deleted file mode 100644 index 61a3346..0000000 --- a/P69P71/src/P69.java +++ /dev/null @@ -1,57 +0,0 @@ -/** -* P69 : چاپ تعداد مقسوم علیه های اول یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/19 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P69 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n:"); - int n=input.nextInt(); // عددی که از کاربر گرفته می شود - - - int allcount=0; //تعداد اعداد اول - - for (int x=1;x<=n;x++) - if (n%x==0) // اگر x مقسوم علیه بود - { - // بررسی اول بودن x - int count=0; - for (int y=1;y<=x;y++) - if (x%y==0) - count++; - - if (count==2) //x اول هست - { - System.out.println(x); - allcount++; - } - - }//end of if n%x==0 - - System.out.println("Count of Primes is: " + allcount); - - - - }// end of main -}// end of class - - - - - - - - - diff --git a/P69P71/src/P70.java b/P69P71/src/P70.java deleted file mode 100644 index 3756cfe..0000000 --- a/P69P71/src/P70.java +++ /dev/null @@ -1,60 +0,0 @@ -/** -* P70 : چاپ جمع مقسوم علیه های اول یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/19 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P70 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n:"); - int n=input.nextInt(); // عددی که از کاربر گرفته می شود - - - int allcount=0; //تعداد مقسوم علیه های اول - int sum=0; //جمع مقسوم علیه های اول - - for (int x=1;x<=n;x++) - if (n%x==0) // اگر x مقسوم علیه بود - { - // بررسی اول بودن x - int count=0; - for (int y=1;y<=x;y++) - if (x%y==0) - count++; - - if (count==2) //x اول هست - { - System.out.println(x); - allcount++; - sum+=x; - } - - }//end of if n%x==0 - - System.out.println("Count of Primes is: " + allcount); - System.out.println("Sum of Primes is: " + sum); - - - - }// end of main -}// end of class - - - - - - - - - diff --git a/P69P71/src/P71.java b/P69P71/src/P71.java deleted file mode 100644 index dc27239..0000000 --- a/P69P71/src/P71.java +++ /dev/null @@ -1,64 +0,0 @@ -/** -* P71 : چاپ میانگین مقسوم علیه های اول یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/19 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P71 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n:"); - int n=input.nextInt(); // عددی که از کاربر گرفته می شود - - - int allcount=0; //تعداد مقسوم علیه های اول - int sum=0; //جمع مقسوم علیه های اول - - for (int x=1;x<=n;x++) - if (n%x==0) // اگر x مقسوم علیه بود - { - // بررسی اول بودن x - int count=0; - for (int y=1;y<=x;y++) - if (x%y==0) - count++; - - if (count==2) //x اول هست - { - System.out.println(x); - allcount++; - sum+=x; - } - - }//end of if n%x==0 - - System.out.println("Count of Primes is: " + allcount); - System.out.println("Sum of Primes is: " + sum); - if (allcount==0) - System.out.println("تعداد مقسوم علیه های اول صفر است هااا"); - else - System.out.println("Avg of Primes is: " + 1.0*sum/allcount); - - - - }// end of main -}// end of class - - - - - - - - - diff --git a/P72/.classpath b/P72/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P72/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P72/.gitignore b/P72/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P72/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P72/.project b/P72/.project deleted file mode 100644 index 8591a97..0000000 --- a/P72/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P72</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P72/.settings/org.eclipse.core.resources.prefs b/P72/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 3130b2a..0000000 --- a/P72/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P72.java=UTF-8 diff --git a/P72/.settings/org.eclipse.jdt.core.prefs b/P72/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P72/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P72/src/P72.java b/P72/src/P72.java deleted file mode 100644 index 86943ff..0000000 --- a/P72/src/P72.java +++ /dev/null @@ -1,72 +0,0 @@ -/** -* P72 : اولین عدد دو رقمی از سری فیبوناچی که با مقلوب خود برابر است -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/07 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -*/ - -import java.util.Scanner; - -public class P72 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - - long a=1; //عدد اول در سری فیبوناچی - long b=1; //عدد دوم در سری فیبوناچی - //System.out.println("1: " + a); - //System.out.println("2: " + b); - - long c=0; //عدد جمع دوتای قبلی در سری فیبوناچی - int count=3; - - while (count<=70) - { - c=a+b; - - //System.out.println(count + ": " + c); - - if (c>=10 && c<=99) - { - //بدست آوردن مقلوب c - long n=c; - long p=0; - while (n>0) - { - long r=n%10; //برای رقم یکان - - // محاسبات روی رقم یکان عدد - //System.out.print(r); - p=p*10+r; - - // حذف رقم یکان - n=n/10; - }// end of while - - - // چاپ نتیجه - //System.out.println(p); - - //بررسی برابری عدد با مقلوب خود - - if (c==p) - System.out.println(count + ": " + c); - - } - - - a=b; - b=c; - - count++; - } - - - - }// end of main -}// end of class diff --git a/P73/.classpath b/P73/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P73/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P73/.gitignore b/P73/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P73/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P73/.project b/P73/.project deleted file mode 100644 index a181864..0000000 --- a/P73/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P73</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P73/.settings/org.eclipse.core.resources.prefs b/P73/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 784f3a0..0000000 --- a/P73/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P73.java=UTF-8 diff --git a/P73/.settings/org.eclipse.jdt.core.prefs b/P73/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P73/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P73/src/P73.java b/P73/src/P73.java deleted file mode 100644 index f416d00..0000000 --- a/P73/src/P73.java +++ /dev/null @@ -1,259 +0,0 @@ -/** -* P73 : چاپ ستاره های مربع و مثلث و اشکال هندسی با ستاره -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/23 -* @Team gClassAcademy -* @Website https://www.youtube.com/c/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P73 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Enter n:"); - int n=input.nextInt(); //عدد ورودی از کاربر - - System.out.println(); - System.out.println("Fig. 1"); - for (int x=1;x<=n;x++) - { - for (int y=1;y<=n;y++) - System.out.print("* "); - System.out.println(""); - } - - - System.out.println(); - System.out.println("Fig. 1.1"); - for (int x=1;x<=n;x++) - { - for (int y=1;y<=n;y++) - if (x==1 || y==1 || x==n || y==n) - System.out.print("* "); - else - System.out.print(" "); - System.out.println(""); - } - - - System.out.println(); - System.out.println("Fig. 1.2"); - for (int x=1;x<=n;x++) - { - for (int y=1;y<=n;y++) - if (x==y) - System.out.print("* "); - else - System.out.print(" "); - System.out.println(""); - } - - - System.out.println(); - System.out.println("Fig. 2"); - for (int x=1;x<=n;x++) - { - for (int y=1;y<=x;y++) - System.out.print("* "); - System.out.println(""); - } - - - System.out.println(); - System.out.println("Fig. 3"); - for (int x=1;x<=n;x++) - { - for (int y=1;y<=x;y++) - System.out.print(" "); - for (int y=1;y<=x;y++) - System.out.print("*"); - System.out.println(""); - } - - - - System.out.println(); - System.out.println("Fig. 4"); - for (int x=1;x<=n;x++) - { - for (int y=1;y<=n-x;y++) - System.out.print(" "); - for (int y=1;y<=x;y++) - System.out.print("*"); - System.out.println(""); - } - - System.out.println(); - System.out.println("Fig. 5"); - for (int x=1;x<=n;x++) - { - for (int y=1;y<=n-x;y++) - System.out.print(" "); - for (int y=1;y<=x;y++) - System.out.print(" *"); - System.out.println(""); - } - - - System.out.println(); - System.out.println("Fig. 6"); - for (int x=1;x<=n;x++) - { - for (int y=1;y<=n-x;y++) - System.out.print(" "); - for (int y=1;y<=x;y++) - System.out.print("*"); - for (int y=1;y<=x-1;y++) - System.out.print("*"); - System.out.println(""); - } - - System.out.println(); - System.out.println("Fig. 7"); - for (int x=1;x<=n;x++) - { - for (int y=1;y<=n-x;y++) - System.out.print(" "); - for (int y=1;y<=x;y++) - System.out.print(" *"); - for (int y=1;y<=x-1;y++) - System.out.print(" *"); - System.out.println(""); - } - - - - System.out.println(); - System.out.println("Fig. 8"); - for (int x=1;x<=n;x++) - { - for (int y=1;y<=n-x;y++) - System.out.print(" "); - for (int y=1;y<=x;y++) - System.out.print("*"); - for (int y=1;y<=x-1;y++) - System.out.print("*"); - System.out.println(""); - } - - - for (int x=1;x<=n;x++) - { - for (int y=1;y<x;y++) - System.out.print(" "); - for (int y=1;y<=n-x;y++) - System.out.print("*"); - System.out.println(""); - } - - - - for (int x=1;x<=n;x++) - { - for (int y=1;y<=n-x;y++) - System.out.print("*"); - System.out.println(""); - } - - - System.out.println(); - System.out.println("Fig. 9"); - for (int x=1;x<=n;x++) - { - for (int y=1;y<=n-x;y++) - System.out.print(" "); - for (int y=1;y<=x;y++) - System.out.print("*"); - for (int y=1;y<=x-1;y++) - System.out.print("*"); - System.out.println(""); - } - - - for (int x=2;x<=n;x++) - { - for (int y=1;y<x;y++) - System.out.print(" "); - for (int y=1;y<=n-x+1;y++) - System.out.print("*"); - - for (int y=1;y<=n-x;y++) - System.out.print("*"); - - System.out.println(""); - } - - - System.out.println(); - System.out.println("Fig. 10"); - for (int x=1;x<=n;x++) - { - for (int y=1;y<=x;y++) - System.out.print("* "); - System.out.println(""); - } - - for (int x=1;x<=n;x++) - { - for (int y=1;y<=n-x;y++) - System.out.print("* "); - System.out.println(""); - } - - System.out.println(); - System.out.println("Fig. 11"); - for (int x=1;x<=n;x++) - { - for (int y=1;y<=n-x;y++) - System.out.print(" "); - for (int y=1;y<=x;y++) - System.out.print("*"); - System.out.println(""); - } - for (int x=2;x<=n;x++) - { - for (int y=1;y<x;y++) - System.out.print(" "); - for (int y=1;y<=n-x+1;y++) - System.out.print("*"); - - System.out.println(""); - } - - - System.out.println(); - System.out.println("Fig. 12"); - for (int x=1;x<=n;x++) - { - for (int y=1;y<=n;y++) - { - for (int z=1;z<=n/2-x/2;z++) - System.out.print(" "); - - if (x==y) - System.out.print("* "); - else - System.out.print(" "); - } - System.out.println(""); - } - - - }// end of main -}// end of class - - - - - - - - - diff --git a/P74/.classpath b/P74/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P74/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P74/.gitignore b/P74/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P74/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P74/.project b/P74/.project deleted file mode 100644 index 85429de..0000000 --- a/P74/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P74</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P74/.settings/org.eclipse.core.resources.prefs b/P74/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index faa101f..0000000 --- a/P74/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P74.java=UTF-8 diff --git a/P74/.settings/org.eclipse.jdt.core.prefs b/P74/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P74/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P74/src/P74.java b/P74/src/P74.java deleted file mode 100644 index be00eff..0000000 --- a/P74/src/P74.java +++ /dev/null @@ -1,47 +0,0 @@ -/** -* P74 : جدول ضرب اعداد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/29 -* @Team gClassAcademy -* @Website youtube.com/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P74 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - - System.out.println(); - for (int x=1;x<=10;x++) - { - for (int y=1;y<=10;y++) - if (x*y>=1 && x*y<=9) - System.out.print(" " + x*y + " "); - else - System.out.print(x*y + " "); - System.out.println(""); - } - - - - - - - }// end of main -}// end of class - - - - - - - - - diff --git a/P75/.classpath b/P75/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P75/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P75/.gitignore b/P75/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P75/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P75/.project b/P75/.project deleted file mode 100644 index ba437f7..0000000 --- a/P75/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P75</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P75/.settings/org.eclipse.core.resources.prefs b/P75/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 872d88e..0000000 --- a/P75/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P75.java=UTF-8 diff --git a/P75/.settings/org.eclipse.jdt.core.prefs b/P75/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P75/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P75/src/P75.java b/P75/src/P75.java deleted file mode 100644 index 1b543c0..0000000 --- a/P75/src/P75.java +++ /dev/null @@ -1,62 +0,0 @@ -/** -* P75 : جدول ضرب مبنای 8 -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/02/04 -* @Team gClassAcademy -* @Website youtube.com/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P75 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.print("Enter n: "); - - - for (int x=1;x<=7;x++) - { - System.out.println(); - for (int y=1;y<=7;y++) - { - //System.out.print(x*y + " "); - - long n=x*y; - long s=0; // برای حاصل جمع نهایی - long p=1; //برای تولید توانهای 10 - while (n>0) - { - s = s + p * (n%8); - p = p*10; - n = n/8; - } - - if (s>=10 && s<=99) - System.out.print(s + " "); - else - System.out.print(s + " "); - - - } - } - - - - - }// end of main -}// end of class - - - - - - - - - diff --git a/P76/.classpath b/P76/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P76/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P76/.gitignore b/P76/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P76/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P76/.project b/P76/.project deleted file mode 100644 index d52db20..0000000 --- a/P76/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P76</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P76/.settings/org.eclipse.core.resources.prefs b/P76/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 8a7d55a..0000000 --- a/P76/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P76.java=UTF-8 diff --git a/P76/.settings/org.eclipse.jdt.core.prefs b/P76/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P76/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P76/src/P76.java b/P76/src/P76.java deleted file mode 100644 index 4e3c9b7..0000000 --- a/P76/src/P76.java +++ /dev/null @@ -1,75 +0,0 @@ -/** -* P76 : تشخیص وجود یک عدد در سری فیبوناچی و اول بودن آن در بین 100 عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/29 -* @Team gClassAcademy -* @Website youtube.com/gClassAcademy -*/ - -import java.util.Scanner; - -public class P76 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - int n=0;// عددی که هر مرحله از کاربر دریافت میشود - int allcount=0; // تعداد اعدادی که هم اول و هم فیبوناچی هستن - - for (int x=1;x<=100;x++) - { - // گرفتن n - System.out.println("Enter n" + x + ": "); - n=input.nextInt(); - - // محاسبات روی n - - // بررسی وجود n در سری فیبوناچی - long a=1; //عدد اول در سری فیبوناچی - long b=1; //عدد دوم در سری فیبوناچی - long c=0; //عدد جمع دوتای قبلی در سری فیبوناچی - while (c<n && n!=1) - { - c=a+b; - //System.out.println(count + ": " + c); - a=b; - b=c; - } - - - // عدد فیبوناچی هست - if (c==n || n==1) - { - //System.out.println("yes"); - - //بررسی اول بودن n - int count=0; - for (int y=1;y<=n;y++) - if (n%y==0) - count++; - - // عدد n اول هست - if (count==2) - allcount++; - } - - - }// end of for x - - - System.out.println("All count is: " + allcount); - - - - - - - - - - - }// end of main -}// end of class diff --git a/P77P80/.classpath b/P77P80/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P77P80/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P77P80/.gitignore b/P77P80/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P77P80/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P77P80/.project b/P77P80/.project deleted file mode 100644 index 575cc7f..0000000 --- a/P77P80/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P77P80</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P77P80/.settings/org.eclipse.core.resources.prefs b/P77P80/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 733a2a9..0000000 --- a/P77P80/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P77.java=UTF-8 -encoding//src/P78.java=UTF-8 -encoding//src/P79.java=UTF-8 -encoding//src/P80.java=UTF-8 diff --git a/P77P80/.settings/org.eclipse.jdt.core.prefs b/P77P80/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P77P80/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P77P80/src/P77.java b/P77P80/src/P77.java deleted file mode 100644 index ce99061..0000000 --- a/P77P80/src/P77.java +++ /dev/null @@ -1,47 +0,0 @@ -/** -* P77 : بررسی کامل بودن یک عدد -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/29 -* @Team gClassAcademy -* @Website youtube.com/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P77 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.print("Enter n:"); - int n = input.nextInt(); //عدد ورودی - int sum=0; // برای جمع مقسوم علیه های n بجز خودش - - for (int x=1;x<=n/2;x++) - if (n%x==0) - { - sum+=x; - System.out.println(x); - } - - System.out.println("Sum is: " + sum); - - if (sum==n) - System.out.println("Yes"); - - - }// end of main -}// end of class - - - - - - - - - diff --git a/P77P80/src/P78.java b/P77P80/src/P78.java deleted file mode 100644 index 998cbae..0000000 --- a/P77P80/src/P78.java +++ /dev/null @@ -1,44 +0,0 @@ -/** -* P78 : چاپ اعداد کامل کمتر از 1000 -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/29 -* @Team gClassAcademy -* @Website youtube.com/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P78 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - - for (int n=1;n<=10000;n++) - { - int sum=0; // برای جمع مقسوم علیه های n بجز خودش - - for (int x=1;x<=n/2;x++) - if (n%x==0) - sum+=x; - - - if (sum==n) - System.out.println(n); - } - - }// end of main -}// end of class - - - - - - - - - diff --git a/P77P80/src/P79.java b/P77P80/src/P79.java deleted file mode 100644 index 7920193..0000000 --- a/P77P80/src/P79.java +++ /dev/null @@ -1,51 +0,0 @@ -/** -* P79 : بررسی کامل بودن عدد بین 100 عدد گرفته شده از کاربر -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/29 -* @Team gClassAcademy -* @Website youtube.com/gClassAcademy -*/ - -import java.util.Scanner; - -public class P79 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - int n=0;// عددی که هر مرحله از کاربر دریافت میشود - int allcount=0; // تعداد اعدادی که هم اول و هم فیبوناچی هستن - - for (int x=1;x<=5;x++) - { - // گرفتن n - System.out.println("Enter n" + x + ": "); - n=input.nextInt(); - - // محاسبات روی n - - - //بررسی کامل بودن n - int sum=0; - for (int y=1;y<=n/2;y++) - if (n%y==0) - sum+=y; - - // عدد n کامل هست - if (sum==n) - allcount++; - - }// end of for x - - - System.out.println("All count is: " + allcount); - - - - - - }// end of main -}// end of class diff --git a/P77P80/src/P80.java b/P77P80/src/P80.java deleted file mode 100644 index e3711e6..0000000 --- a/P77P80/src/P80.java +++ /dev/null @@ -1,51 +0,0 @@ -/** -* P80 : بررسی کامل بودن عدد بین 100 عدد گرفته شده از کاربر -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/01/29 -* @Team gClassAcademy -* @Website youtube.com/gClassAcademy -*/ - -import java.util.Scanner; - -public class P80 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - int n=0;// عددی که هر مرحله از کاربر دریافت میشود - int allcount=0; // تعداد اعدادی که هم اول و هم فیبوناچی هستن - - for (int x=1;x<=100;x++) - { - // گرفتن n - System.out.println("Enter n" + x + ": "); - n=input.nextInt(); - - // محاسبات روی n - - - //بررسی کامل بودن n - int sum=0; - for (int y=1;y<=n/2;y++) - if (n%y==0) - sum+=y; - - // عدد n کامل هست - if (sum==n && n%2==0) - allcount++; - - }// end of for x - - - System.out.println("All count is: " + allcount); - - - - - - }// end of main -}// end of class diff --git a/P7P11/.classpath b/P7P11/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P7P11/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P7P11/.gitignore b/P7P11/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P7P11/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P7P11/.project b/P7P11/.project deleted file mode 100644 index d41f4cb..0000000 --- a/P7P11/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P7P11</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P7P11/.settings/org.eclipse.core.resources.prefs b/P7P11/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index c356e31..0000000 --- a/P7P11/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,4 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P10.java=UTF-8 -encoding//src/P11.java=UTF-8 -encoding//src/P9.java=UTF-8 diff --git a/P7P11/.settings/org.eclipse.jdt.core.prefs b/P7P11/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P7P11/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P7P11/src/P10.java b/P7P11/src/P10.java deleted file mode 100644 index cd51d8d..0000000 --- a/P7P11/src/P10.java +++ /dev/null @@ -1,24 +0,0 @@ -import java.util.Scanner; - -public class P10 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - int sum = 0; -// for (int x=2 ; x<=100 ; x=x+2) -// sum = sum + x; - - - for (int x=1 ; x<=100 ; x++) - if (x%2 == 1) //x فرد است - sum = sum + x; - - System.out.println("sum is : " + sum); - - - - } - -} diff --git a/P7P11/src/P11.java b/P7P11/src/P11.java deleted file mode 100644 index 8f653c4..0000000 --- a/P7P11/src/P11.java +++ /dev/null @@ -1,19 +0,0 @@ -import java.util.Scanner; - -public class P11 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.println("Please enter n:"); - int n=input.nextInt(); - - - for (int x=1 ; x<=n ; x++) - System.out.println(x); - - - } - -} diff --git a/P7P11/src/P7.java b/P7P11/src/P7.java deleted file mode 100644 index 809ae44..0000000 --- a/P7P11/src/P7.java +++ /dev/null @@ -1,15 +0,0 @@ -import java.util.Scanner; - -public class P7 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - for (int x=1 ; x<=10 ; x++) - System.out.println(x); - - - } - -} diff --git a/P7P11/src/P8.java b/P7P11/src/P8.java deleted file mode 100644 index 7588f04..0000000 --- a/P7P11/src/P8.java +++ /dev/null @@ -1,19 +0,0 @@ -import java.util.Scanner; - -public class P8 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - int sum = 0; - for (int x=1 ; x<=10 ; x++) - sum+=x; //sum = sum + x; - - System.out.println("sum is : " + sum); - - - - } - -} diff --git a/P7P11/src/P9.java b/P7P11/src/P9.java deleted file mode 100644 index 2d72d8e..0000000 --- a/P7P11/src/P9.java +++ /dev/null @@ -1,24 +0,0 @@ -import java.util.Scanner; - -public class P9 { - - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - int sum = 0; -// for (int x=2 ; x<=100 ; x=x+2) -// sum = sum + x; - - - for (int x=1 ; x<=100 ; x++) - if (x%2 == 0) //x زوج است - sum = sum + x; - - System.out.println("sum is : " + sum); - - - - } - -} diff --git a/P82P83/.classpath b/P82P83/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P82P83/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P82P83/.gitignore b/P82P83/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P82P83/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P82P83/.project b/P82P83/.project deleted file mode 100644 index 14559c2..0000000 --- a/P82P83/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P82P83</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P82P83/.settings/org.eclipse.core.resources.prefs b/P82P83/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 7a489af..0000000 --- a/P82P83/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P82.java=UTF-8 -encoding//src/P83.java=UTF-8 diff --git a/P82P83/.settings/org.eclipse.jdt.core.prefs b/P82P83/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P82P83/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P82P83/src/P82.java b/P82P83/src/P82.java deleted file mode 100644 index 9a98d9c..0000000 --- a/P82P83/src/P82.java +++ /dev/null @@ -1,61 +0,0 @@ -/** -* P82 : تبدیل یک عدد از مبنای 10 به مبنای 2 -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/02/04 -* @Team gClassAcademy -* @Website youtube.com/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P82 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.print("Enter n: "); - long n = input.nextInt(); // برای عدد گرفته شده از کاربر - long m=n; - - long s=0; // برای حاصل جمع نهایی - long p=1; //برای تولید توانهای 10 - while (n>0) - { - s = s + p * (n%2); - p = p*10; - n = n/2; - } - - System.out.println(s); - - - - - - String ss=""; - while (m>0) - { - ss=m%2 + ss; - m = m/2; - } - System.out.println("\n" + ss); - - - - - - }// end of main -}// end of class - - - - - - - - - diff --git a/P82P83/src/P83.java b/P82P83/src/P83.java deleted file mode 100644 index 99df01f..0000000 --- a/P82P83/src/P83.java +++ /dev/null @@ -1,61 +0,0 @@ -/** -* P83 : تبدیل یک عدد از مبنای 10 به مبنای 8 -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/02/04 -* @Team gClassAcademy -* @Website youtube.com/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P83 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.print("Enter n: "); - long n = input.nextInt(); // برای عدد گرفته شده از کاربر - long m=n; - - long s=0; // برای حاصل جمع نهایی - long p=1; //برای تولید توانهای 10 - while (n>0) - { - s = s + p * (n%8); - p = p*10; - n = n/8; - } - - System.out.println(s); - - - - - - String ss=""; - while (m>0) - { - ss=m%8 + ss; - m = m/8; - } - System.out.println("\n" + ss); - - - - - - }// end of main -}// end of class - - - - - - - - - diff --git a/P85P86/.classpath b/P85P86/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P85P86/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P85P86/.gitignore b/P85P86/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P85P86/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P85P86/.project b/P85P86/.project deleted file mode 100644 index 4460313..0000000 --- a/P85P86/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P85P86</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P85P86/.settings/org.eclipse.core.resources.prefs b/P85P86/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 8bfdbae..0000000 --- a/P85P86/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P84.java=UTF-8 -encoding//src/P85.java=UTF-8 -encoding//src/P86.java=UTF-8 -encoding//src/P87.java=UTF-8 diff --git a/P85P86/.settings/org.eclipse.jdt.core.prefs b/P85P86/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P85P86/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P85P86/src/P84.java b/P85P86/src/P84.java deleted file mode 100644 index 442293d..0000000 --- a/P85P86/src/P84.java +++ /dev/null @@ -1,93 +0,0 @@ -/** -* P86 : ضرب و جمع در مبنای 8 -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/02/05 -* @Team gClassAcademy -* @Website youtube.com/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P84 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.print("Enter n1,n2 (8): "); - long n1 = input.nextLong(); // برای عدد گرفته شده از کاربر - long n2 = input.nextLong(); // برای عدد گرفته شده از کاربر - - - - ///////////// تبدیل اعداد از 8 به مبنای 10 - - long s1=0; // معادل n1 در مبنای 10 - long p=1; //برای تولید توانهای 2 - while (n1>0) - { - s1 = s1 + p * (n1 % 10); - p = p*8; - n1 = n1 / 10; - } - //System.out.println(s1); - - long s2=0; // معادل n2 در مبنای 10 - p=1; //برای تولید توانهای 2 - while (n2>0) - { - s2 = s2 + p * (n2 % 10); - p = p*8; - n2 = n2 / 10; - } - //System.out.println(s2); - - - ////////////////// عملیات در مبنای 10 - - long sum=s1+s2; // برای جمع دو عدد - long product = s1*s2; // برای ضرب دو عدد - - - ////////////////////// تبدیل از 10 به 8 - - long s=0; // برای حاصل جمع نهایی - p=1; //برای تولید توانهای 10 - while (sum>0) - { - s = s + p * (sum%8); - p = p*10; - sum = sum/8; - } - System.out.println("\nSum in base 8 is: " + s); - - - - - long ss=0; // برای حاصل جمع نهایی - p=1; //برای تولید توانهای 10 - while (product>0) - { - ss = ss + p * (product%8); - p = p*10; - product = product/8; - } - System.out.println("Product in base 8 is: " + ss); - - - - - }// end of main -}// end of class - - - - - - - - - diff --git a/P85P86/src/P85.java b/P85P86/src/P85.java deleted file mode 100644 index 5d531bd..0000000 --- a/P85P86/src/P85.java +++ /dev/null @@ -1,49 +0,0 @@ -/** -* P85 : تبدیل یک عدد از مبنای 2 به مبنای 10 -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/02/04 -* @Team gClassAcademy -* @Website youtube.com/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P85 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.print("Enter n: "); - long m = input.nextLong(); // برای عدد گرفته شده از کاربر - - long s=0; // برای حاصل جمع نهایی - long p=1; //برای تولید توانهای 2 - while (m>0) - { - s = s + p * (m%10); - p = p*2; - m = m/10; - } - - System.out.println(s); - - - - - - - }// end of main -}// end of class - - - - - - - - - diff --git a/P85P86/src/P86.java b/P85P86/src/P86.java deleted file mode 100644 index a32249e..0000000 --- a/P85P86/src/P86.java +++ /dev/null @@ -1,49 +0,0 @@ -/** -* P86 : تبدیل یک عدد از مبنای 8 به مبنای 10 -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/02/04 -* @Team gClassAcademy -* @Website youtube.com/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P86 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.print("Enter n: "); - long m = input.nextLong(); // برای عدد گرفته شده از کاربر - - long s=0; // برای حاصل جمع نهایی - long p=1; //برای تولید توانهای 2 - while (m>0) - { - s = s + p * (m%10); - p = p*8; - m = m/10; - } - - System.out.println(s); - - - - - - - }// end of main -}// end of class - - - - - - - - - diff --git a/P85P86/src/P87.java b/P85P86/src/P87.java deleted file mode 100644 index 99b9fb5..0000000 --- a/P85P86/src/P87.java +++ /dev/null @@ -1,62 +0,0 @@ -/** -* P87 : تبدیل یک عدد از مبنای 2 به مبنای 8 غیرمستقیم -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/02/04 -* @Team gClassAcademy -* @Website youtube.com/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P87 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.print("Enter n: "); - long m = input.nextLong(); // برای عدد گرفته شده از کاربر - - long ss=0; // برای حاصل جمع نهایی - long pp=1; //برای تولید توانهای 2 - while (m>0) - { - ss = ss + pp * (m%10); - pp = pp*2; - m = m/10; - } - - //System.out.println(ss); - - - long n=ss; - - long s=0; // برای حاصل جمع نهایی - long p=1; //برای تولید توانهای 10 - while (n>0) - { - s = s + p * (n%8); - p = p*10; - n = n/8; - } - - System.out.println(s); - - - - - - }// end of main -}// end of class - - - - - - - - - diff --git a/P87P89/.classpath b/P87P89/.classpath deleted file mode 100644 index 60b915a..0000000 --- a/P87P89/.classpath +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"> - <attributes> - <attribute name="module" value="true"/> - </attributes> - </classpathentry> - <classpathentry kind="src" path="src"/> - <classpathentry kind="output" path="bin"/> -</classpath> diff --git a/P87P89/.gitignore b/P87P89/.gitignore deleted file mode 100644 index ae3c172..0000000 --- a/P87P89/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/bin/ diff --git a/P87P89/.project b/P87P89/.project deleted file mode 100644 index 3e138be..0000000 --- a/P87P89/.project +++ /dev/null @@ -1,17 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<projectDescription> - <name>P87P89</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/P87P89/.settings/org.eclipse.core.resources.prefs b/P87P89/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index f4252b4..0000000 --- a/P87P89/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,4 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/P871.java=UTF-8 -encoding//src/P88.java=UTF-8 -encoding//src/P89.java=UTF-8 diff --git a/P87P89/.settings/org.eclipse.jdt.core.prefs b/P87P89/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index e2e9c66..0000000 --- a/P87P89/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=11 diff --git a/P87P89/src/P871.java b/P87P89/src/P871.java deleted file mode 100644 index 5d9cd30..0000000 --- a/P87P89/src/P871.java +++ /dev/null @@ -1,53 +0,0 @@ -/** -* P87 : تبدیل یک عدد از مبنای 2 به مبنای 8 روش مستقیم -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/02/05 -* @Team gClassAcademy -* @Website youtube.com/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P871 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.print("Enter n: "); - long n = input.nextLong(); // برای عدد گرفته شده از کاربر - System.out.println(n); - - - long p=1; - long sum = 0; - while (n>0) - { - long r = n%1000; - long k = r%10 + (((r/10)%10) *2) + ((r/100) *4); - - sum = sum + p * k; - p=p*10; - - n = n/1000; - } - - System.out.println(sum); - - - - - }// end of main -}// end of class - - - - - - - - - diff --git a/P87P89/src/P88.java b/P87P89/src/P88.java deleted file mode 100644 index ba52da2..0000000 --- a/P87P89/src/P88.java +++ /dev/null @@ -1,52 +0,0 @@ -/** -* P88 : تبدیل یک عدد از مبنای 10 به مبنای 16 روش رشته ای -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/02/05 -* @Team gClassAcademy -* @Website youtube.com/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P88 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.print("Enter n: "); - long n = input.nextLong(); // برای عدد گرفته شده از کاربر - - String s=""; // برای حاصل جمع نهایی - while (n>0) - { - long r = n % 16; - - if (r<10) - s = r + s; - else - s = (char)(r+55) + s; - - n = n/16; - } - - System.out.println(s); - - - - - - }// end of main -}// end of class - - - - - - - - - diff --git a/P87P89/src/P89.java b/P87P89/src/P89.java deleted file mode 100644 index b47e7e3..0000000 --- a/P87P89/src/P89.java +++ /dev/null @@ -1,54 +0,0 @@ -/** -* P89 : تبدیل یک عدد از مبنای 2 به مبنای 16 روش مستقیم -* -* @author Gholamali Nejad Hajali Irani -* @version 1.0 -* @since 2021/02/05 -* @Team gClassAcademy -* @Website youtube.com/gClassAcademy -* -*/ - -import java.util.Scanner; - -public class P89 -{ - public static void main(String[] args) - { - Scanner input=new Scanner (System.in); - - System.out.print("Enter n: "); - long n = input.nextLong(); // برای عدد گرفته شده از کاربر - //System.out.println(n); - - - String sum = ""; - while (n>0) - { - long r = n%10000; - long k = r%10 + (((r/10)%10) *2) + ((r/100)%10 *4) + (r/1000)*8; - - if (k<10) - sum = k + sum; - else - sum = (char)(k+55) + sum; - - n = n/10000; - } - - System.out.println(sum); - - - - - }// end of main -}// end of class - - - - - - - - - diff --git a/README.md b/README.md new file mode 100644 index 0000000..ee157a0 --- /dev/null +++ b/README.md @@ -0,0 +1,17 @@ +# Programming-Java +حل بیش از 300 مسئله و پروژه با زبان جاوا +Problem Solving with Java (more than 300 problem and project) + +در این دوره سعی شده است بیش از 300 مسئله در زبان جاوا به صورت کامل نوشته شده و در صورت لزوم رفع خطا شده و مرحله به مرحله شرح داده شود. +پیش نیاز این دوره ، فاز 1 آموزشهای من می باشد. در این دوره آموزشی الگوریتم و نحوه پیدا کردن جواب مسئله هدف نیست. برای درک کامل الگوریتم مسئله ها باید فیلمهای فاز 1 رو مشاهده نمایید. +در این دوره هدف فقط نوشتن و جواب گرفتن از مسئله ها می باشد. +مرجع سوالات ما در این آموزش سوالات ورژن 1.4 من می باشد که در آدرس زیر قرارداده شده است. + +آدرس دانلود سورس کدها : +https://github.com/gClassAcademy/Programming-Java + +کلیه منابع دوره ، سوالات و دی وی دی دوره درآدرس درس توی وب سایت من موجود می باشند : +http://gclass.co/?page_id=908 + +آدرس وب سایت من : +http://gclass.co/