Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Construct a control flow graph for the program using basic blocks with statement numbers. main() { int sum, i, j; 1. sum = 0; 2.
Construct a control flow graph for the program using basic blocks with statement numbers.
main() {
int sum, i, j;
1. sum = 0;
2. i = 1;
3. while (i <= 5){
4. scanf ("%d", &j);
5. if (j < 0)
6. continue;
7. sum = sum + j;
8. if (sum > 10)
9. break;
10 i = i + 1;
11. }
12. printf ("sum is %d", sum);
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored 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