Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion homework4.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
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.
.gitignore�� git ���� �������� ������ ��� ���ϵ��� �������ִ� �����̴�.
�̴� �α� �����̳� ���� �� �����Ǵ� ���� ���� git �������� track �� commit�� �� ������ �ϴ� ���̴�.
Ư�� Ȯ���ڸ� ���� ���� ��ü��, Ư���� ����, Ư�� ���丮�� ��ġ�� ���� ���� ������ �� �ִ�.

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.
SSH key�� ���� � ü������ remote computer��� ������ �Ǵ� shell session�� �����ϰ� ���� ������ ���� �� �ֵ��� �Ѵ�.
SSH key�� public key�� private key�� ��ǻ�� �� ¦���� �����Ǵµ�, Github ����ڴ� �̶� ������, public key�� �ڽ��� ������ ����Ѵ�.
���� Git���� ������ Ȯ���� ��, Github���� ����� public key�� ��ǻ�Ϳ� ����Ǿ� �ִ� private key�� ¦�� �̷�� ���� ������ ��� �ȴ�.
16 changes: 12 additions & 4 deletions homework4/Source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,20 @@ int main()
int* output = new int[arrsize];
cout << "Array output: ";

/***********************************
Implement the code here!
************************************/
for(int i=0;i<arrsize;i++)
output[i] = 0;
for(int i=0;i<arrsize;i++){
for (int j=i+1; j<arrsize; j++){
if(arr[i]>arr[j])
output[i] += 1;
else if(arr[i] < arr[j])
output[j] += 1;
}
}


for (int i = 0; i < arrsize; i++) {
cout << output[i] << " ";
}
return 0;
}
}