Displayed Step 4 4 B 5 C 7 Pseudocode Step 1 Start Step 2 Declare Variables B C Step 3 Rea Q37130873

  • What is displayed in step 4 if a =4, b=5, c=7 in thepseudocode

Step 1: Start

Step 2: Declare variables a, b andc.

Step 3: Read variables a, b, c

Step 4: if a > b

                      If a > c

                                 Display a

                      Else

                                 Display c

Else

      If b > c

                 Display b

      Else

                 Display c

Answer: 4, 7, a, c

  • What is the time complexity of fun() given the pseudocodebelow?

Function fun(int n) {

For (int i=1; i<=n; i++) {

         Int j = n;

        While(j >= 1) {

         J = j/2 // assumesinteger division with no fraction

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.