We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f83a9e9 commit 9244871Copy full SHA for 9244871
EIP/C/README.md
@@ -502,6 +502,33 @@
502
503
- [답] qwe
504
505
+- 문제9. 다음은 이진수를 십진수로 변환하는 C언어 코드이다. 괄호 (a) (b) 에 적합한 답을 작성하시오.
506
+
507
+ ```c
508
+ #include <stdio.h>
509
510
+ int main() {
511
+ int input = 101110;
512
+ int di = 1;
513
+ int sum = 0;
514
515
+ while (1) {
516
+ if (input == 0) break
517
+ else {
518
+ sum = sum + (input (a)(b)) * di;
519
+ di = di * 2;
520
+ input = input / 10;
521
+ }
522
523
+ printf("%d", sum);
524
+ return 0;
525
526
+ ```
527
528
+ - [답]
529
+ - (a) % (b) 10 or 5 or 2
530
+ - (a) & (b) 1
531
532
533
534
#### 2023년 2회
0 commit comments