diff --git a/src/lab/six/Five.java b/src/lab/six/Five.java new file mode 100644 index 0000000..5f0c1eb --- /dev/null +++ b/src/lab/six/Five.java @@ -0,0 +1,12 @@ +package lab.six; + +public class Five { + public static void main(String []args){ + for (int i = 1; i<= 10; i++){ + if (i < 6){ + System.out.println(i); + } + else break; + } + } +} diff --git a/src/lab/six/Four.java b/src/lab/six/Four.java new file mode 100644 index 0000000..b3b3fbd --- /dev/null +++ b/src/lab/six/Four.java @@ -0,0 +1,15 @@ +package lab.six; + +public class Four { + public static void main(String []args){ + int i = 1; + int sum = 0; + while (i <= 10 ){ + if (i != 3 && i != 6){ + sum += i; + } + i++; + } + System.out.println(sum); + } +} diff --git a/src/lab/six/One.java b/src/lab/six/One.java new file mode 100644 index 0000000..dc9ce0a --- /dev/null +++ b/src/lab/six/One.java @@ -0,0 +1,11 @@ +package lab.six; + +public class One { + public static void main(String [] args){ + for (int i = 1; i<= 100; i++){ + if (i % 2 != 0){ + System.out.println(i); + } + } + } +} diff --git a/src/lab/six/Six.java b/src/lab/six/Six.java new file mode 100644 index 0000000..d036e5a --- /dev/null +++ b/src/lab/six/Six.java @@ -0,0 +1,12 @@ +package lab.six; + +public class Six { + public static void main(String []args){ + for (int i = 1; i<= 10; i++){ + if (i == 6){ + continue; + } + else System.out.println(i);; + } + } +} diff --git a/src/lab/six/Three.java b/src/lab/six/Three.java new file mode 100644 index 0000000..419ebab --- /dev/null +++ b/src/lab/six/Three.java @@ -0,0 +1,25 @@ +package lab.six; + +public class Three { + public static void main(String []args){ + for (int i = 1; i <= 5; i++){ + switch (i){ + case 1: + System.out.println("A"); + break; + case 2: + System.out.println("B"); + break; + case 3 : + System.out.println("C"); + break; + case 4 : + System.out.println("D"); + break; + case 5: + System.out.println("E"); + break; + } + } + } +} diff --git a/src/lab/six/Two.java b/src/lab/six/Two.java new file mode 100644 index 0000000..ab1fe9c --- /dev/null +++ b/src/lab/six/Two.java @@ -0,0 +1,14 @@ +package lab.six; + +public class Two { + public static void main(String []args){ + + int i = 10; + do { + System.out.println(i); + i--; + } while (i >= 0); + + } + +}