Skip to content

Commit

Permalink
Create 2024-10-13-data-structure.md
Browse files Browse the repository at this point in the history
  • Loading branch information
gghwan authored Oct 12, 2024
1 parent b2b6444 commit be1775b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions _posts/2024-10-13-data-structure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
다음 코드의 출력값을 작성하시오
#include <stdio.h>
int main() {
int result[5];
int arr[5] = {77, 32, 10, 99, 50};
for(int i= 0; i< 5; i++) {
result[i] = 1;
for(int j = 0; j < 5; j++) {
if(arr[i] < arr[j]) {
result[i]++;
}
}
}
for(int k = 0; k < 5; k++) {
printf("%d ", result[k]);
}
return 0;
}

0 comments on commit be1775b

Please sign in to comment.