What is the cyclomatic complexity of the following pseudo code program segment? Use line numbers in the left column to indicate independent paths. Hint: Draw a flowchart and draw execution lines through the flowchart.
1) Read (A, B)
2) If (A>B)
3) Print A
4) Else
5) Print B
6) While (A>B)
7) A = A-1
8) End
1) Read (A, B) O(1) 2) If (A>B) 3) Print A O(1) 4) Else 5) Print B O(1) 6) While (A>B) 7) A = A-1 O(Infinity) 8) End =============================== 6) While (A>B) 7) A = A-1 If A < B then the loop never ends. So, the loop is an infinite loop. So, complexity = O(Infinity)

What is the cyclomatic complexity of the following pseudo code program segment? Use line numbers in...
What will be left in a and b after the execution of the pseudo code below? Draw a flowchart for the code. a=4 b=10 while (a is less than b) do if (b is less than 12) then b=b+3 else a a +1 b b+2 endif a=a+1 while (b is greater than or equal to 14) do b=b-1 endwhile endwhile b=b+ 100
What will be left in a and b after the execution of the pseudo code below? Draw a...
What is the Cyclomatic Complexity for the following pseudo-code fragment? i=1; n=10; while (i<n) do j=i+1; while (j<n) do if A[i]<A[j] then swap(A[i], A[j]); end if end while; i=i+1; end while; CC = E – N + 2P E = number of edges (transfers in control) N = number of nodes P = number of disconnected parts of the flow graph (e.g. a calling program and a subroutine)
What is the output of the following pseudo-code segment? A, B, C, or None of the above ** In pseudo-code, you ignore syntax errors and focus on the logic ** score = 60 if (score >= 70) print "C" else if (score >= 80) print "B" else if (score >= 90) print "A" and score = 105 if (score >= 90 && score <= 100) print "A" else if (score >= 80) print "B" else print "C"
What is the value of GPA when grade is 'B' in the following code segment? int GPA=0; switch (grade) { case 'A': case 'a': GPA = GPA + 1; case 'B': case 'b': GPA = GPA + 1; case 'C': case 'c': GPA = GPA + 1; case 'D': case 'd': GPA = GPA + 1; } 4 3 2 1 None of the above #2. Branching - switch statements... Extra info/hint? It's free What is the value of GPA when...
Given the following pseudo-code, please show what the outputs will be at LINE A, B, C and D. please put down “inconclusive” if you think the CPU process scheduling could potentially result in multiple values for integer i. You will receive partial credit if you draw the process tree. int i = 0; int main(){ if (fork() == 0) { i++; if (fork() == 0){ if (fork() == 0){ i++; print value...
guys can you please help me to to write a pseudo code for this
program and write the code of the program in visual studio
in.cpp.
compile the program and run and take screenshot of the output
and upload it. please help is really appreciated.
UTF-8"CPP Instruction SU2019 LA X 119SU-COSC-1436- C Get Homework Help With Che X Facebook -1.amazonaws.com/blackboard.learn.xythos.prod/584b1d8497c84/98796290? response-content-dis 100% School of Engineering and Technology COSC1436-LAB1 Note: in the instruction of the lab change "yourLastName" to your last...
Write a PYTHON program that allows the user to navigate the lines of text in a file. The program should prompt the user for a filename and input the lines of text into a list. The program then enters a loop in which it prints the number of lines in the file and prompts the user for a line number. Actual line numbers range from 1 to the number of lines in the file. If the input is 0, the...
Consider the following pseudo-code fragment. What is the value of mystery(2, 3)? BEGIN PROGRAM mystery(int a, int b) IF (b==1) RETURN a END IF ELSE RETURN a + mystery(a, b - 1) END ELSE END PROGRAM mystery 2 4 6 8 the program generates a run time error (infinite recursion) I have no idea
Draw the flowchart of the code: Write code that opens an Excel file named area.xlsx, writes 'Radius' in cell A1, writes 'Area' in cell B1, and then using the while command populates the next 10 rows of column A (A2-A11) with the numbers 1, 2, ..., 10 and the next 10 rows of column B with the circle areas that correspond to the radii on the left. A while loop should be used.
What is the output of the program segment? Assume there are no syntax errors and the code will compile. int i = 1; int n = 0; do { cout << i; i++; } while (i <= n); b) What are the values of i and n after execution? Assume there are no syntax errors and the code will compile. int i = 1; int n = 0; do { cout << i; i++; } while (i <= n);