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

1. .gitignore란, 이 파일 안의 내용들을 git의 관리 대상에서 제외할 때 쓰는 파일이다.

2.SSH key 는 github계정에 특정 컴퓨터를 등록하게 하는 고유 키로, 매번 컴퓨터에서 아이디와 비밀번호를 입력하지 않아도 되는 이점이 있어 사용한다.
20 changes: 16 additions & 4 deletions homework4/Source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,24 @@ int main()
int* output = new int[arrsize];
cout << "Array output: ";

/***********************************
Implement the code here!
************************************/
int howmany = 0;

for (int i = 0; i < arrsize; i++) {
for (int j = 0; j < arrsize; j++) {
if (arr[j] < arr[i]) {
howmany += 1;
}
}
output[i] = howmany;
howmany = 0;
}

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

delete[] arr;
delete[] output;

return 0;
}
}