Please draw a flow chart diagram. Only a flow chart.
Answer the following. For each code segment, draw the flow diagram and provide the cyclomatic complexity. Label each node with the line numbers range (such as lines 2-3).
Submit a flow diagram (flowchart) - as we learned last week, calculate the cyclomatic complexity. You need a Control Flow Graph to calculate that. We only ask for the value (the cyclomatic complexity metric value), but you could optionally add the CFG. It could help for partial credits (or better feedback) in case the value reported is wrong. Note: Assume short-circuit evaluation of Boolean expressions is done.
1. //segment4
2. int sum = 0;
3. for (int i = ; i < limit++; i++)
4. if (i <= 2) {
5. print "Alpha";
6. }
7. for (int j = 2; j < i; ++j) {
8. if (i % j == 0) {
9. print "Beta";
10. }
11. sum += i;
12. }