You are on page 1of 2

Question 2:

Answers
State Transition Diagram

Awaiting
job

Queing
job

A waiting
operator
interventi
on

The state coverage in the diagram is 2.


The transition coverage

Question 4:
Answers

1 #include <iostream>
2 using namespace std;
3 int main ()
4{
5 int i, n, f;
6 cout << n = ;
7 cin >> n;
8 if (n < 0){
9 cout << Invalid: << n;
10 n = -1;
11 } else {
12 f = 1;
13 for (i=1; i <= n; i++) {
14 f *= i;
15
16
17 }

Printing
job

Awaiting
user
intervent
ion

18 return 0;
19 }

Control Flow Diagram

ENTE
R

Exit

You might also like