Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions