0
2.3kviews
Draw Data Flow Graph for below given routine

This question appears in Mumbai University > Software Testing & Quality Assurance Subject

Marks: 10 M

Year: June 2012

1 Answer
0
9views

/* pow(m,n) computes m to the power of n */

voidpow ( int m, n) {

float q;

int p;

if( n<0)

p = 0-n ;

else

p = n;

q= 1.0;

while (p ! = 0)

        {

         q= q * m ;

        p = p-1 ;

         }

if (n< 0)

q = 1.0/ q ;

printf (“ %f” , q) ;

}

Ans :

Data Flow Graph for power of a number :

enter image description here

          Figure : Data flow Graph for Power of a number
Please log in to add an answer.