Computer Science, asked by ritesh7229983, 4 months ago

Consider the following program for calculating the factorial of a number. It

consists of main( ) program and the module fact( ). Calculate the individual

cyclomatic complexity number for main( ) and fact( ) and then the cyclomatic

complexity for the whole program. Draw DD graph. List all independent

paths and design test cases from independent paths.

main()

{

int number;

int fact();

clrscr();

printf(“enter the number whose factorial is to be found out”);

scanf(“%d”, & number);

if (number < 0)

printf(“factorial cannot be defined for this number”);

else

printf(“factorial is %d”, fact(number));

}

int fact( int number )

{

int index;

int product=1;

for ( index=1; index<=number; index++)product=product*index;

return(product);

} ​

Answers

Answered by Rocky197100
1

Answer:

the complex call the product one is including return the product I know that much

Answered by ragnosVA
0

Q. Consider the program for calculating the factorial of a number. It consists of main() program and the module fact(). Calculate the individual cyclomatic complexity number for main() and fact() and then, the cyclomatic complexity

for the whole program.

Attachments:
Similar questions