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
7 changes: 6 additions & 1 deletion homework4.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
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.

git 의 관리대상에서 특정 파일이나 디렉토리를 제외할때 쓰는 파일이다.

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 키는 사용자를 식별하는 키이다. public key 와 private key 가 있는데 public key 는 공유 서비스에서 사용되고, private key 는 개인 컴퓨터에 저장된다. 이 키가 일치하면 사용자에게 권한이 부여되는 방식으로서 타인이 나의 파일에 임의로 PUSH 하는 것을 방지한다. 매번 유저네임과 비밀번호를 입력할 필요를 없게 해주기 때문에 필요하다.
15 changes: 10 additions & 5 deletions homework4/Source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,18 @@ int main()

int* output = new int[arrsize];
cout << "Array output: ";

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

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