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
T={t1
t2< n=3, EOP=>
t3< n=4,EOP=>
t4< n=5, EOP=>}int main()
{
int n , index;
cout<<"Enter a Number :"<< endl;
cin >> n;
index =2;
while(index <= n -1){
if(n % index ==0){
cout<<"It is not prime Number "<< endl;
break;
}
index ++;
}
if(index == n){
cout<<"It is prime Number "
}
return 0;
}

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 Programming Questions!