Question
using the pseudocode below: 1. Draw the flow graph representation. 2. Label its regions and using three methods, calculate the Cyclomatic Complexity, V(G) of your
using the pseudocode below:
1. Draw the flow graph representation.
2. Label its regions and using three methods, calculate the Cyclomatic Complexity, V(G) of your program.
START
Declare loan_amt, dep as numeric
Write Enter loan amount
Read loan_amt
Do while loan_amt <> -1
If loan_amt >= 150000 then
Write Not allowed
else
if loan_amt < 50000 then
dep <--- 0.08 * loan_amt
else
if loan_amt >= 50000 and loan_amt <= 149999 then
if loan_amt > 100000 then
dep 2000 + (0.1 * (loan_amt-100000))
else
dep <--- 2000
end if
(else)
end if
end if
write dep
end if
read loan_amt
Enddo
Print loan_amt, dep
STOP
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started