Computer Science, asked by gorangvishnoi09, 1 month ago

Consider the program given below for calculating the factorial of a number. It consists of main() program and the module fact(). Draw the control flow graph of the program. Compute the Cyclomatic Complexity for both main() and fact() independently. Also compute the Cyclomatic complexity of the
complete program and find all independent paths.
main(){
int n;
int fact(int);
1. clrscr();
2. cout<< “Enter the number-”;
3. cin>>n;
4. if (n<0)
5. cout<<”NA”;
6. else
7. cout<<”Factorial is -”< 8. }
int fact(int n)
{
int i;
1. int p=1;
2. for(i=1;i<=n;i++)
3. i=p×i;
4. return(p);
5. }

Answers

Answered by sangeetakarwasra9630
0

Answer:

Dushyant is present

My name Dushyant

And your name? :-

Explanation:

Similar questions