Skip to content

Commit f352da2

Browse files
Irani-LaptopIrani-Laptop
Irani-Laptop
authored and
Irani-Laptop
committed
first time
1 parent 729ad21 commit f352da2

21 files changed

+479
-0
lines changed

P75/.classpath

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

P75/.gitignore

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

P75/.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>P75</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding//src/P75.java=UTF-8
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=11
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12+
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13+
org.eclipse.jdt.core.compiler.release=enabled
14+
org.eclipse.jdt.core.compiler.source=11

P75/src/P75.java

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/**
2+
* P75 : جدول ضرب مبنای 8
3+
*
4+
* @author Gholamali Nejad Hajali Irani
5+
* @version 1.0
6+
* @since 2021/02/04
7+
* @Team gClassAcademy
8+
* @Website youtube.com/gClassAcademy
9+
*
10+
*/
11+
12+
import java.util.Scanner;
13+
14+
public class P75
15+
{
16+
public static void main(String[] args)
17+
{
18+
Scanner input=new Scanner (System.in);
19+
20+
System.out.print("Enter n: ");
21+
22+
23+
for (int x=1;x<=7;x++)
24+
{
25+
System.out.println();
26+
for (int y=1;y<=7;y++)
27+
{
28+
//System.out.print(x*y + " ");
29+
30+
long n=x*y;
31+
long s=0; // برای حاصل جمع نهایی
32+
long p=1; //برای تولید توانهای 10
33+
while (n>0)
34+
{
35+
s = s + p * (n%8);
36+
p = p*10;
37+
n = n/8;
38+
}
39+
40+
if (s>=10 && s<=99)
41+
System.out.print(s + " ");
42+
else
43+
System.out.print(s + " ");
44+
45+
46+
}
47+
}
48+
49+
50+
51+
52+
}// end of main
53+
}// end of class
54+
55+
56+
57+
58+
59+
60+
61+
62+

P82P83/.classpath

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

P82P83/.gitignore

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

P82P83/.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>P82P83</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
eclipse.preferences.version=1
2+
encoding//src/P82.java=UTF-8
3+
encoding//src/P83.java=UTF-8
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=11
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12+
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13+
org.eclipse.jdt.core.compiler.release=enabled
14+
org.eclipse.jdt.core.compiler.source=11

P82P83/src/P82.java

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/**
2+
* P82 : تبدیل یک عدد از مبنای 10 به مبنای 2
3+
*
4+
* @author Gholamali Nejad Hajali Irani
5+
* @version 1.0
6+
* @since 2021/02/04
7+
* @Team gClassAcademy
8+
* @Website youtube.com/gClassAcademy
9+
*
10+
*/
11+
12+
import java.util.Scanner;
13+
14+
public class P82
15+
{
16+
public static void main(String[] args)
17+
{
18+
Scanner input=new Scanner (System.in);
19+
20+
System.out.print("Enter n: ");
21+
long n = input.nextInt(); // برای عدد گرفته شده از کاربر
22+
long m=n;
23+
24+
long s=0; // برای حاصل جمع نهایی
25+
long p=1; //برای تولید توانهای 10
26+
while (n>0)
27+
{
28+
s = s + p * (n%2);
29+
p = p*10;
30+
n = n/2;
31+
}
32+
33+
System.out.println(s);
34+
35+
36+
37+
38+
39+
String ss="";
40+
while (m>0)
41+
{
42+
ss=m%2 + ss;
43+
m = m/2;
44+
}
45+
System.out.println("\n" + ss);
46+
47+
48+
49+
50+
51+
}// end of main
52+
}// end of class
53+
54+
55+
56+
57+
58+
59+
60+
61+

P82P83/src/P83.java

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/**
2+
* P83 : تبدیل یک عدد از مبنای 10 به مبنای 8
3+
*
4+
* @author Gholamali Nejad Hajali Irani
5+
* @version 1.0
6+
* @since 2021/02/04
7+
* @Team gClassAcademy
8+
* @Website youtube.com/gClassAcademy
9+
*
10+
*/
11+
12+
import java.util.Scanner;
13+
14+
public class P83
15+
{
16+
public static void main(String[] args)
17+
{
18+
Scanner input=new Scanner (System.in);
19+
20+
System.out.print("Enter n: ");
21+
long n = input.nextInt(); // برای عدد گرفته شده از کاربر
22+
long m=n;
23+
24+
long s=0; // برای حاصل جمع نهایی
25+
long p=1; //برای تولید توانهای 10
26+
while (n>0)
27+
{
28+
s = s + p * (n%8);
29+
p = p*10;
30+
n = n/8;
31+
}
32+
33+
System.out.println(s);
34+
35+
36+
37+
38+
39+
String ss="";
40+
while (m>0)
41+
{
42+
ss=m%8 + ss;
43+
m = m/8;
44+
}
45+
System.out.println("\n" + ss);
46+
47+
48+
49+
50+
51+
}// end of main
52+
}// end of class
53+
54+
55+
56+
57+
58+
59+
60+
61+

P85P86/.classpath

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

P85P86/.gitignore

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

P85P86/.project

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>P85P86</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
eclipse.preferences.version=1
2+
encoding//src/P85.java=UTF-8
3+
encoding//src/P86.java=UTF-8
4+
encoding//src/P87.java=UTF-8
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
3+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
4+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
5+
org.eclipse.jdt.core.compiler.compliance=11
6+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
7+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
8+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
9+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
10+
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
11+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12+
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
13+
org.eclipse.jdt.core.compiler.release=enabled
14+
org.eclipse.jdt.core.compiler.source=11

P85P86/src/P85.java

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/**
2+
* P85 : تبدیل یک عدد از مبنای 2 به مبنای 10
3+
*
4+
* @author Gholamali Nejad Hajali Irani
5+
* @version 1.0
6+
* @since 2021/02/04
7+
* @Team gClassAcademy
8+
* @Website youtube.com/gClassAcademy
9+
*
10+
*/
11+
12+
import java.util.Scanner;
13+
14+
public class P85
15+
{
16+
public static void main(String[] args)
17+
{
18+
Scanner input=new Scanner (System.in);
19+
20+
System.out.print("Enter n: ");
21+
long m = input.nextLong(); // برای عدد گرفته شده از کاربر
22+
23+
long s=0; // برای حاصل جمع نهایی
24+
long p=1; //برای تولید توانهای 2
25+
while (m>0)
26+
{
27+
s = s + p * (m%10);
28+
p = p*2;
29+
m = m/10;
30+
}
31+
32+
System.out.println(s);
33+
34+
35+
36+
37+
38+
39+
}// end of main
40+
}// end of class
41+
42+
43+
44+
45+
46+
47+
48+
49+

0 commit comments

Comments
 (0)