Question: Study the C + + code below carefully to answer the following questions: ( 1 0 points ) a ) Draw the CFG ? b

Study the C++ code below carefully to answer the following questions:
(10 points)
a) Draw the CFG?
b) Is T adequate using the block coverage criterion? Show full analysis
>>nn=2==0==nt4">t3">
t4">t2">
t3">
t4">T={t1">
t2">
t3">
t4">}
int main()
{
int n, index;
cout "Enter a number: " endl;
cin >n;
index =2;
while (indexn-1){
if(n% index ==0){
cout "Itis not a prime number" endl;
break;
}
index++;
}
if(index==n)
cout "Itis a prime number" endl;
}??end main
 Study the C++ code below carefully to answer the following questions:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!