diff --git a/homework4.txt b/homework4.txt index d8160f0..5530980 100644 --- a/homework4.txt +++ b/homework4.txt @@ -1,2 +1,4 @@ 1. What is .gitignore? You can write the answer either in Korean or English. -2. Why do Github users need an SSH key pair? (Users can use either SSH key pair or github account info.) Please write down a brief explanation of SSH key. \ No newline at end of file +.gitignore informs git to ignore the files after file has been committed. +2. Why do Github users need an SSH key pair? (Users can use either SSH key pair or github account info.) Please write down a brief explanation of SSH key. +Github users need an SSH key pair just becuse they don't have to login with their usernmae and password all time and the key pair acts as an alternate to them. \ No newline at end of file diff --git a/homework4/Source.cpp b/homework4/Source.cpp index ab69b66..0979d95 100644 --- a/homework4/Source.cpp +++ b/homework4/Source.cpp @@ -25,6 +25,16 @@ int main() int* output = new int[arrsize]; cout << "Array output: "; + int p; + for (int i = 0; i < arrsize; i++) { + p = 0; + for (int j = 0; j < arrsize; j++) { + if (arr[i] < arr[j]) { + p++; + } + } + output[i] = p; + } /*********************************** Implement the code here! ************************************/ diff --git a/myfile.txt b/myfile.txt new file mode 100644 index 0000000..20f11a5 --- /dev/null +++ b/myfile.txt @@ -0,0 +1 @@ +myfile