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
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions

Question

Q.1. what is constitution? Q.2. key of the constitution?

Answered: 1 week ago

Question

Q.1. what is meant by federal system?

Answered: 1 week ago