Skip to content

Commit dab8ebe

Browse files
authored
Add files via upload
1 parent 462d33b commit dab8ebe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+950
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$">
6+
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
7+
</content>
8+
<orderEntry type="inheritedJdk" />
9+
<orderEntry type="sourceFolder" forTests="false" />
10+
</component>
11+
</module>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import java.awt.*;
2+
import java.lang.reflect.Array;
3+
import java.util.concurrent.Future;
4+
import java.util.Scanner;
5+
import java.util.Arrays;
6+
7+
public class Main {
8+
9+
public static void main(String[] args) {
10+
11+
}
12+
13+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$">
6+
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
7+
</content>
8+
<orderEntry type="inheritedJdk" />
9+
<orderEntry type="sourceFolder" forTests="false" />
10+
</component>
11+
</module>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import java.awt.*;
2+
import java.lang.reflect.Array;
3+
import java.util.concurrent.Future;
4+
import java.util.Scanner;
5+
import java.util.Arrays;
6+
7+
public class Main {
8+
9+
public static void main(String[] args) {
10+
System.out.println("Enter an age: ");
11+
Scanner in = new Scanner(System.in);
12+
int age = in.nextInt();
13+
14+
if (age >= 0 && age <= 5) {
15+
System.out.println("Baby");
16+
} else if (age >= 6 && age <= 11) {
17+
System.out.println("Kid");
18+
} else if (age >= 12 && age <= 17) {
19+
System.out.println("Teen");
20+
} else if (age >= 18) {
21+
System.out.println("Adult");
22+
} else {
23+
System.out.println("Invalid");
24+
}
25+
26+
System.out.println("Thanks for using this program!");
27+
}
28+
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$">
6+
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
7+
</content>
8+
<orderEntry type="inheritedJdk" />
9+
<orderEntry type="sourceFolder" forTests="false" />
10+
</component>
11+
</module>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import java.awt.*;
2+
import java.lang.reflect.Array;
3+
import java.util.concurrent.Future;
4+
import java.util.Scanner;
5+
import java.util.Arrays;
6+
7+
public class Main {
8+
9+
public static void main(String[] args) {
10+
11+
// WHILE
12+
System.out.println("While Loop");
13+
int x = 3;
14+
while(x > 0) {
15+
System.out.println("Current x:" + x);
16+
x = x - 1;
17+
}
18+
System.out.println("Final x: " + x);
19+
System.out.println();
20+
21+
22+
// DO WHILE
23+
System.out.println("Do-While Loop");
24+
int y = 3;
25+
do {
26+
System.out.println("Current y: " + y);
27+
y = y - 1;
28+
} while(y > 0);
29+
System.out.println("Final y: "+ y);
30+
System.out.println();
31+
32+
// FOR LOOP
33+
System.out.println("For Loop");
34+
for(int i = 3; i > 0; i--) {
35+
System.out.println("Current i: " + i);
36+
}
37+
System.out.println();
38+
}
39+
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$">
6+
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
7+
</content>
8+
<orderEntry type="inheritedJdk" />
9+
<orderEntry type="sourceFolder" forTests="false" />
10+
</component>
11+
</module>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import java.awt.*;
2+
import java.lang.reflect.Array;
3+
import java.util.concurrent.Future;
4+
import java.util.Scanner;
5+
import java.util.Arrays;
6+
7+
public class Main {
8+
9+
public static void main(String[] args) {
10+
11+
// WHILE
12+
System.out.println("While Loop");
13+
int x = 3;
14+
while(x > 0) {
15+
System.out.println("Current x:" + x);
16+
x = x - 1;
17+
}
18+
System.out.println("Final x: " + x);
19+
System.out.println();
20+
21+
22+
// DO WHILE
23+
System.out.println("Do-While Loop");
24+
int y = 3;
25+
do {
26+
System.out.println("Current y: " + y);
27+
y = y - 1;
28+
} while(y > 0);
29+
System.out.println("Final y: "+ y);
30+
System.out.println();
31+
32+
// FOR LOOP
33+
System.out.println("For Loop");
34+
for(int i = 3; i > 0; i--) {
35+
System.out.println("Current i: " + i);
36+
}
37+
System.out.println();
38+
}
39+
40+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="JAVA_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$">
6+
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
7+
</content>
8+
<orderEntry type="inheritedJdk" />
9+
<orderEntry type="sourceFolder" forTests="false" />
10+
</component>
11+
</module>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import java.awt.*;
2+
import java.lang.reflect.Array;
3+
import java.util.concurrent.Future;
4+
import java.util.Scanner;
5+
import java.util.Arrays;
6+
7+
public class Main {
8+
9+
public static void main(String[] args) {
10+
11+
}
12+
13+
}

0 commit comments

Comments
 (0)