Q3. For the given program, draw the Control Flow Graph and find its cyclomatic complexity and write all linear independent paths and derive atleast one test case for each path.(5+2+2+1)
1- #include
2- void main()
3- {
4- int a,b,c,flag;
5-printf("enter three sides of a triangle");
6-scanf("%d%d%d",&a,&b,&c);
7- printf(“Side A is : %d”, a);
8- printf(“Side B is : %d”, b);
9- printf(“Side C is : %d”, c);
10-if((a<b+c) && (b<a+c) && (c< a+b))
11- flag=1;
12- else
13- flag=0;
14-if(flag)
15-
16-if((a==b) && (b==c))
17-printf(“equilateral triangle”);
18-else
19-if ((a! =b) && (a!=c) && (b!=c))
20-printf(“scalene”);
21-else
22-printf(“isosceles”);
23-}
24-else
25-printf (“not triangle”);
26-printf (“end of program”);
Answers
Answered by
0
Answer:
please pahle Hamen English ka maaf kar do koi Humko mimic Nahin de raha Humko maaf kar rahe the tabhi Ham pura answer Bata Denge
Similar questions
Computer Science,
3 months ago
Math,
3 months ago
Political Science,
3 months ago
Music,
6 months ago
English,
6 months ago
English,
11 months ago
Chemistry,
11 months ago
Math,
11 months ago