diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..ab1f416 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,10 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Ignored default folder with query files +/queries/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/lab-java-loops-and-version-control.iml b/.idea/lab-java-loops-and-version-control.iml new file mode 100644 index 0000000..d6ebd48 --- /dev/null +++ b/.idea/lab-java-loops-and-version-control.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..07115cd --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..dfda522 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/main.java b/main.java new file mode 100644 index 0000000..c050777 --- /dev/null +++ b/main.java @@ -0,0 +1,48 @@ +public class Main { + public static void main(String[] args) { + + int[] array = {10, 20, 30, 40, 50}; + System.out.println(maxMinusMin(array)); + twoSmallestNumbers(array); + System.out.println(mathExpression(10,10)); + } + + + public static int maxMinusMin(int[] arrays){ + int max=0; + for (int i=0; imax){ + max=arrays[i]; + } + } + int min=arrays[0]; + for (int i=0; i