From 8deb59fbe9be73e79d66dbc63856b5489af6cb24 Mon Sep 17 00:00:00 2001 From: Fannan Fauzan Fardhurohman Date: Thu, 1 Oct 2020 20:14:25 +0700 Subject: [PATCH] adding new class hello world using function and making hello world --- .idea/.gitignore | 3 ++ .idea/misc.xml | 6 +++ .idea/modules.xml | 8 +++ .idea/vcs.xml | 6 +++ HelloWorld.java | 2 +- HelloWorldUsingMethod.java | 9 ++++ Programming_basics.iml | 11 ++++ hello_world.java | 11 ---- .../.github/workflows/blank.yml | 33 ++++++++++++ .../Programming_basics/.idea/.gitignore | 3 ++ .../Programming_basics/.idea/misc.xml | 6 +++ .../Programming_basics/.idea/modules.xml | 8 +++ .../Programming_basics/.idea/vcs.xml | 6 +++ .../Programming_basics/HelloWorld.class | Bin 0 -> 534 bytes .../HelloWorldUsingMethod.class | Bin 0 -> 636 bytes .../Programming_basics/HourGlass_Challenge | 49 +++++++++++++++++ out/production/Programming_basics/LICENSE | 21 ++++++++ .../Programming_basics/Programming_basics.iml | 11 ++++ out/production/Programming_basics/README.md | 7 +++ .../hourglass_challenge_java | 50 ++++++++++++++++++ 20 files changed, 238 insertions(+), 12 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 HelloWorldUsingMethod.java create mode 100644 Programming_basics.iml delete mode 100644 hello_world.java create mode 100644 out/production/Programming_basics/.github/workflows/blank.yml create mode 100644 out/production/Programming_basics/.idea/.gitignore create mode 100644 out/production/Programming_basics/.idea/misc.xml create mode 100644 out/production/Programming_basics/.idea/modules.xml create mode 100644 out/production/Programming_basics/.idea/vcs.xml create mode 100644 out/production/Programming_basics/HelloWorld.class create mode 100644 out/production/Programming_basics/HelloWorldUsingMethod.class create mode 100644 out/production/Programming_basics/HourGlass_Challenge create mode 100644 out/production/Programming_basics/LICENSE create mode 100644 out/production/Programming_basics/Programming_basics.iml create mode 100644 out/production/Programming_basics/README.md create mode 100644 out/production/Programming_basics/hourglass_challenge_java diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..e208459 --- /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..7d55746 --- /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/HelloWorld.java b/HelloWorld.java index 702cb8e..8b20ecc 100644 --- a/HelloWorld.java +++ b/HelloWorld.java @@ -1,4 +1,4 @@ -class HelloWorld { +public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } diff --git a/HelloWorldUsingMethod.java b/HelloWorldUsingMethod.java new file mode 100644 index 0000000..d6cdc13 --- /dev/null +++ b/HelloWorldUsingMethod.java @@ -0,0 +1,9 @@ +public class HelloWorldUsingMethod { + static void hello_world(){ + System.out.println("Hello World"); + } + + public static void main(String[] args) { + hello_world(); + } +} diff --git a/Programming_basics.iml b/Programming_basics.iml new file mode 100644 index 0000000..b107a2d --- /dev/null +++ b/Programming_basics.iml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/hello_world.java b/hello_world.java deleted file mode 100644 index 37cc814..0000000 --- a/hello_world.java +++ /dev/null @@ -1,11 +0,0 @@ - -class HelloWorld -{ - // Your program begins with a call to main(). - // Prints "Hello, World" to the terminal window. - public static void main(String args[]) - { - System.out.println("Hello, World"); - } -} - diff --git a/out/production/Programming_basics/.github/workflows/blank.yml b/out/production/Programming_basics/.github/workflows/blank.yml new file mode 100644 index 0000000..9ddbd2e --- /dev/null +++ b/out/production/Programming_basics/.github/workflows/blank.yml @@ -0,0 +1,33 @@ +# This is a basic workflow to help you get started with Actions + +name: CI + +# Controls when the action will run. Triggers the workflow on push or pull request +# events but only for the master branch +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + # Runs a single command using the runners shell + - name: Run a one-line script + run: echo Hello, world! + + # Runs a set of commands using the runners shell + - name: Run a multi-line script + run: | + echo Add other actions to build, + echo test, and deploy your project. diff --git a/out/production/Programming_basics/.idea/.gitignore b/out/production/Programming_basics/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/out/production/Programming_basics/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/out/production/Programming_basics/.idea/misc.xml b/out/production/Programming_basics/.idea/misc.xml new file mode 100644 index 0000000..e208459 --- /dev/null +++ b/out/production/Programming_basics/.idea/misc.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/out/production/Programming_basics/.idea/modules.xml b/out/production/Programming_basics/.idea/modules.xml new file mode 100644 index 0000000..7d55746 --- /dev/null +++ b/out/production/Programming_basics/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/out/production/Programming_basics/.idea/vcs.xml b/out/production/Programming_basics/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/out/production/Programming_basics/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/out/production/Programming_basics/HelloWorld.class b/out/production/Programming_basics/HelloWorld.class new file mode 100644 index 0000000000000000000000000000000000000000..fb9f6b029b5851a734896e227c9bb5e0d1a5c4da GIT binary patch literal 534 zcmZuuO;5r=5Pb`U(pm*U@LRzXdaxH04;U{d#zUhf7(94dV1rAxT~msQKT8jqc<=}K zqm0wVq>|9XOy|9s_h#DfpU*DT7#A=N++xa#p(ru83aC698#;00GgDSfYFHSCZ^$YsRPXg>sF z{>**FqmkcDVi}D(#)HQrnyM|J8QiX(#shIFQ`2&$dz?ynuu-zH<6#$j^jKoM&O;#k+Qp<|OFek@%XoG?VI zdo2d-)awd{bVIu0a^$pyf5Y20MY0XA!|fLLrSd01E$GW3L!oglY}>o@e7k!)ly2`r z1bwetXGrx`;^A3kh}_}QWyn|W8w38tYc_X#wPxT`MLlfJ{T|Wf=A;>nrZ@6C;!LV( zigOztC{_~*Bz0_=D4|Rfgve4jn~rT0JJ>amMv}prOTv(u4tLcah)ysQYQ78u;n2Rk z5hbj#66w{hNk%|o1b0YyF65XEGw6>BWYZ3;>bw=8OkbnZzX4G&C4{U&UX5->cWnOy z?3Er7q{zm@AcIM7a}2-&7RgH}i4;-A6+)|%d_yD~eTSw9XftGuFcl@ZM(_-lCMAa< b0? + + + + + + + + + + \ No newline at end of file diff --git a/out/production/Programming_basics/README.md b/out/production/Programming_basics/README.md new file mode 100644 index 0000000..80a4071 --- /dev/null +++ b/out/production/Programming_basics/README.md @@ -0,0 +1,7 @@ +# Programming_basics +# code in java to print hello_world +public class Hello_world { + public static void main(String [] args) { + System.out.println("Hello_world"); + +}} diff --git a/out/production/Programming_basics/hourglass_challenge_java b/out/production/Programming_basics/hourglass_challenge_java new file mode 100644 index 0000000..d9dbbb7 --- /dev/null +++ b/out/production/Programming_basics/hourglass_challenge_java @@ -0,0 +1,50 @@ +// C++ program to find maximum sum of hour +// glass in matrix +#include +using namespace std; +const int R = 5; +const int C = 5; + +// Returns maximum sum of hour glass in ar[][] +int findMaxSum(int mat[R][C]) +{ + if (R<3 || C<3) + return -1; + + // Here loop runs (R-2)*(C-2) times considering + // different top left cells of hour glasses. + int max_sum = INT_MIN; + for (int i=0; i