diff --git a/2extra/.idea/description.html b/2extra/.idea/description.html new file mode 100644 index 0000000..db5f129 --- /dev/null +++ b/2extra/.idea/description.html @@ -0,0 +1 @@ +Simple Java application that includes a class with main() method \ No newline at end of file diff --git a/2extra/.idea/encodings.xml b/2extra/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/2extra/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/2extra/.idea/misc.xml b/2extra/.idea/misc.xml new file mode 100644 index 0000000..89e42c1 --- /dev/null +++ b/2extra/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/2extra/.idea/modules.xml b/2extra/.idea/modules.xml new file mode 100644 index 0000000..c6dd162 --- /dev/null +++ b/2extra/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/2extra/.idea/project-template.xml b/2extra/.idea/project-template.xml new file mode 100644 index 0000000..1f08b88 --- /dev/null +++ b/2extra/.idea/project-template.xml @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/2extra/.idea/workspace.xml b/2extra/.idea/workspace.xml new file mode 100644 index 0000000..a6ed93a --- /dev/null +++ b/2extra/.idea/workspace.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1554484069828 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/2extra/2extra.iml b/2extra/2extra.iml new file mode 100644 index 0000000..d5c0743 --- /dev/null +++ b/2extra/2extra.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/2extra/out/production/2extra/com/company/Main.class b/2extra/out/production/2extra/com/company/Main.class new file mode 100644 index 0000000..124bb35 Binary files /dev/null and b/2extra/out/production/2extra/com/company/Main.class differ diff --git a/2extra/src/com/company/Main.java b/2extra/src/com/company/Main.java new file mode 100644 index 0000000..1bfe58f --- /dev/null +++ b/2extra/src/com/company/Main.java @@ -0,0 +1,29 @@ +package com.company; + +import java.util.Scanner; + +public class Main { + + public static void main(String[] args) { + int capacity = 100; + Scanner sc = new Scanner(System.in); + System.out.println("please enter the amount of people in the room"); + int input1 = sc.nextInt(); + System.out.println("the amount of people still in the queue"); + int input2 = sc.nextInt(); + int now = 100 - input1; + + + for (int user = 0; user 0) { + System.out.println("fit"); + now--; + } else { + System.out.println("can't fit"); + now--; + } + } + + } + +} \ No newline at end of file diff --git a/THEORYANSWERS.md b/THEORYANSWERS.md new file mode 100644 index 0000000..983820a --- /dev/null +++ b/THEORYANSWERS.md @@ -0,0 +1,13 @@ +1: b +2: apt-get install +3: d +4: a +5: b +6: a +7: 1 +8: 15 +9: 3 +10: 1 +11: true +12: true +13: true \ No newline at end of file diff --git a/test1/.idea/description.html b/test1/.idea/description.html new file mode 100644 index 0000000..db5f129 --- /dev/null +++ b/test1/.idea/description.html @@ -0,0 +1 @@ +Simple Java application that includes a class with main() method \ No newline at end of file diff --git a/test1/.idea/encodings.xml b/test1/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/test1/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/test1/.idea/misc.xml b/test1/.idea/misc.xml new file mode 100644 index 0000000..89e42c1 --- /dev/null +++ b/test1/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/test1/.idea/modules.xml b/test1/.idea/modules.xml new file mode 100644 index 0000000..eb5a4da --- /dev/null +++ b/test1/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/test1/.idea/project-template.xml b/test1/.idea/project-template.xml new file mode 100644 index 0000000..1f08b88 --- /dev/null +++ b/test1/.idea/project-template.xml @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/test1/.idea/workspace.xml b/test1/.idea/workspace.xml new file mode 100644 index 0000000..d3bd428 --- /dev/null +++ b/test1/.idea/workspace.xml @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1554482655129 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test1/out/production/test1/com/company/Main.class b/test1/out/production/test1/com/company/Main.class new file mode 100644 index 0000000..4d30dc8 Binary files /dev/null and b/test1/out/production/test1/com/company/Main.class differ diff --git a/test1/src/com/company/Main.java b/test1/src/com/company/Main.java new file mode 100644 index 0000000..5e44ce3 --- /dev/null +++ b/test1/src/com/company/Main.java @@ -0,0 +1,14 @@ +package com.company; + +import java.util.Scanner; + +public class Main { + + public static void main(String[] args) { + System.out.println("Hello, user, what is your name?"); + Scanner sc = new Scanner(System.in); + String name = sc.nextLine(); + System.out.println(name + ", welcome!"); + + } +} diff --git a/test1/test1.iml b/test1/test1.iml new file mode 100644 index 0000000..d5c0743 --- /dev/null +++ b/test1/test1.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/test2/.idea/compiler.xml b/test2/.idea/compiler.xml new file mode 100644 index 0000000..217af47 --- /dev/null +++ b/test2/.idea/compiler.xml @@ -0,0 +1,23 @@ + + + + + + diff --git a/test2/.idea/description.html b/test2/.idea/description.html new file mode 100644 index 0000000..db5f129 --- /dev/null +++ b/test2/.idea/description.html @@ -0,0 +1 @@ +Simple Java application that includes a class with main() method \ No newline at end of file diff --git a/test2/.idea/encodings.xml b/test2/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/test2/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/test2/.idea/misc.xml b/test2/.idea/misc.xml new file mode 100644 index 0000000..c9209a5 --- /dev/null +++ b/test2/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/test2/.idea/modules.xml b/test2/.idea/modules.xml new file mode 100644 index 0000000..2f87be9 --- /dev/null +++ b/test2/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/test2/.idea/vcs.xml b/test2/.idea/vcs.xml new file mode 100644 index 0000000..def6a6a --- /dev/null +++ b/test2/.idea/vcs.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/test2/.idea/workspace.xml b/test2/.idea/workspace.xml new file mode 100644 index 0000000..2833430 --- /dev/null +++ b/test2/.idea/workspace.xml @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1554482719249 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test2/out/production/test2/Main.class b/test2/out/production/test2/Main.class new file mode 100644 index 0000000..eb7048a Binary files /dev/null and b/test2/out/production/test2/Main.class differ diff --git a/test2/src/Main.java b/test2/src/Main.java new file mode 100644 index 0000000..d80ac17 --- /dev/null +++ b/test2/src/Main.java @@ -0,0 +1,21 @@ +import java.util.Scanner; + +public class Main { + + public static void main(String[] args) { +int capacity = 100; + Scanner sc = new Scanner(System.in); + System.out.println("please enter the amount of people in the room"); + int input1 = sc.nextInt(); + System.out.println("the amount of people still in the queue"); + int input2 = sc.nextInt(); + if (100-input1-input2>=0){ + System.out.println("can fit"); + } else { + System.out.println("can't fit"); + } + + + + } +} diff --git a/test2/test2.iml b/test2/test2.iml new file mode 100644 index 0000000..d5c0743 --- /dev/null +++ b/test2/test2.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/test3/.idea/description.html b/test3/.idea/description.html new file mode 100644 index 0000000..db5f129 --- /dev/null +++ b/test3/.idea/description.html @@ -0,0 +1 @@ +Simple Java application that includes a class with main() method \ No newline at end of file diff --git a/test3/.idea/encodings.xml b/test3/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/test3/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/test3/.idea/misc.xml b/test3/.idea/misc.xml new file mode 100644 index 0000000..89e42c1 --- /dev/null +++ b/test3/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/test3/.idea/modules.xml b/test3/.idea/modules.xml new file mode 100644 index 0000000..2e99a71 --- /dev/null +++ b/test3/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/test3/.idea/project-template.xml b/test3/.idea/project-template.xml new file mode 100644 index 0000000..1f08b88 --- /dev/null +++ b/test3/.idea/project-template.xml @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/test3/.idea/workspace.xml b/test3/.idea/workspace.xml new file mode 100644 index 0000000..2ef438c --- /dev/null +++ b/test3/.idea/workspace.xml @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1554484625694 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test3/out/production/test3/com/company/Main.class b/test3/out/production/test3/com/company/Main.class new file mode 100644 index 0000000..0e4a3e5 Binary files /dev/null and b/test3/out/production/test3/com/company/Main.class differ diff --git a/test3/src/com/company/Main.java b/test3/src/com/company/Main.java new file mode 100644 index 0000000..ef0f1be --- /dev/null +++ b/test3/src/com/company/Main.java @@ -0,0 +1,20 @@ +package com.company; + +public class Main { + + public static void main(String[] args) { + int a=0; + int b=1; + int i =0; + int c =a+b; + System.out.println(c); +while (i<39){ + + System.out.println(c); + a=b; + b=c; + c=a+b; + i++; + } + } +} diff --git a/test3/test3.iml b/test3/test3.iml new file mode 100644 index 0000000..d5c0743 --- /dev/null +++ b/test3/test3.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/test5/.idea/description.html b/test5/.idea/description.html new file mode 100644 index 0000000..db5f129 --- /dev/null +++ b/test5/.idea/description.html @@ -0,0 +1 @@ +Simple Java application that includes a class with main() method \ No newline at end of file diff --git a/test5/.idea/encodings.xml b/test5/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/test5/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/test5/.idea/misc.xml b/test5/.idea/misc.xml new file mode 100644 index 0000000..89e42c1 --- /dev/null +++ b/test5/.idea/misc.xml @@ -0,0 +1,9 @@ + + + + + + + + \ No newline at end of file diff --git a/test5/.idea/modules.xml b/test5/.idea/modules.xml new file mode 100644 index 0000000..7977acb --- /dev/null +++ b/test5/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/test5/.idea/project-template.xml b/test5/.idea/project-template.xml new file mode 100644 index 0000000..1f08b88 --- /dev/null +++ b/test5/.idea/project-template.xml @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/test5/.idea/workspace.xml b/test5/.idea/workspace.xml new file mode 100644 index 0000000..86ba7ec --- /dev/null +++ b/test5/.idea/workspace.xml @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1554485997149 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test5/out/production/test5/com/company/Main.class b/test5/out/production/test5/com/company/Main.class new file mode 100644 index 0000000..8f423dd Binary files /dev/null and b/test5/out/production/test5/com/company/Main.class differ diff --git a/test5/src/com/company/Main.java b/test5/src/com/company/Main.java new file mode 100644 index 0000000..3cd4632 --- /dev/null +++ b/test5/src/com/company/Main.java @@ -0,0 +1,26 @@ +package com.company; + +import java.util.Scanner; + +public class Main { + + public static void main(String[] args) { + System.out.println("please enter your credit card number"); + Scanner input = new Scanner(System.in); + String card = input.next(); + int chars = card.length(); + int i = 1; + int t = 2; + int z = 0; + while (t < chars) { + if (card.charAt(i) != card.charAt(t)) { + break;} + else{ + z = z + card.charAt(i); + } + i++; + t++; + } + System.out.println( "hash="+ z ); + } + } diff --git a/test5/test5.iml b/test5/test5.iml new file mode 100644 index 0000000..d5c0743 --- /dev/null +++ b/test5/test5.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + +