'How to draw a Control Flow Graph for the following piece of code?
L1: input(a, b, c)
L2: d <- b * b -4 * a * c;
L3: if ( d>0 ) then
L4: r <- 2
L5: else_if ( d=0 ) then
L6: r <- 1
L7: else_if ( d<0 ) then
L8: r ,_ 0;
L9: output(r)
How do I draw Control Flow Graph from this code? It's not a homework question, I just try to understand the course material. Thanks.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
