diff --git a/homework4.txt b/homework4.txt index d8160f0..890d72f 100644 --- a/homework4.txt +++ b/homework4.txt @@ -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. \ No newline at end of file +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. git에서 file 또는 directory를 관리 대상에서 제외할 때 사용하는 파일이다. + +2. SSH keys는 PC와 e-mail을 연결해주는 개별적인 암호이다. SSH key가 있어야 사용자들을 구분할 수 있다. \ No newline at end of file diff --git a/homework4/Source.cpp b/homework4/Source.cpp index ab69b66..890741f 100644 --- a/homework4/Source.cpp +++ b/homework4/Source.cpp @@ -25,9 +25,15 @@ int main() int* output = new int[arrsize]; cout << "Array output: "; - /*********************************** - Implement the code here! - ************************************/ + for (int i = 0; i < arrsize; i++) { + while (true) { + output[i] = (rand() % 10); + if (output[i] <= arr[i]) { + break; + } + } + + } for (int i = 0; i < arrsize; i++) { cout << output[i] << " ";