Skip to content

Commit 5abd1c3

Browse files
committed
insert those 2
1 parent dcd6b49 commit 5abd1c3

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
//Compute the square and cubes
2+
package classes;
3+
4+
/**
5+
*
6+
* @author Samuel Edward
7+
*/
8+
public class Square_and_Cubes {
9+
public static void main (String args []) {
10+
11+
//Block for displaying the numbers itself
12+
System.out.print("The numbers are : ");
13+
for(int i =1; i<=10; i++){
14+
System.out.print( i);
15+
if (i < 10) {
16+
System.out.print(",");
17+
}else {
18+
System.out.println(".");
19+
}
20+
}
21+
//Block for displaying the square of those numbers
22+
System.out.print("The numbers for the square are : ");
23+
for(int i =1; i<=10; i++){
24+
System.out.print( i*i);
25+
if (i < 10) {
26+
System.out.print(",");
27+
}else {
28+
System.out.println(".");
29+
}
30+
}
31+
32+
//Block for displaying the cube of those numbers
33+
System.out.print("The numbers for the cube are : ");
34+
for(int i =1; i<=10; i++){
35+
System.out.print( i*i*i);
36+
if (i < 10) {
37+
System.out.print(",");
38+
}else {
39+
System.out.print(".");
40+
}
41+
}
42+
43+
44+
}
45+
}

samueledward/Question 2.0/TOD.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
package classes;
3+
4+
/**
5+
*
6+
* @author Samuel Edward
7+
*/
8+
public class TOD {
9+
public static void main (String args []) {
10+
11+
//Printing TOD
12+
System.out.println(" *********** * *");
13+
System.out.println(" * * * * *");
14+
System.out.println(" * * * * *");
15+
System.out.println(" * * * * *");
16+
System.out.println(" * * * * *");
17+
System.out.println(" * * * * * *");
18+
19+
20+
}
21+
}

0 commit comments

Comments
 (0)