Page 1 of 1

What is the value of x after execution? int n = 841; int x = 1; for (i = 0; i < 50; i++) { int nx = (x + n / x) / 2; X =

Posted: Sat May 14, 2022 8:32 pm
by answerhappygod
What Is The Value Of X After Execution Int N 841 Int X 1 For I 0 I 50 I Int Nx X N X 2 X 1
What Is The Value Of X After Execution Int N 841 Int X 1 For I 0 I 50 I Int Nx X N X 2 X 1 (27.67 KiB) Viewed 170 times
How to solve these ?
What is the value of x after execution? int n = 841; int x = 1; for (i = 0; i < 50; i++) { int nx = (x + n / x) / 2; X = nx; } Pick ONE option 14 O 70 O 17 29 Clear Selection 2. Time Complexity 2 What is the time complexity of this code? int temp = 0; for (int i = 0; i<n; i++) { for (int j = 0; j<imi; j++) { for (int k = 1; -k; k -= 1) { temp++; } Pick ONE option O O(n) O O(n) C oins logn O O(n)