Decision coverage:
Given code is
integer A,B;
input(A);
while(A>0)
{
A=2*A;
if(A<20 or A>30)
{
b=A+2;
}
else{
B=A+2;
}
output(A,B);
input(A);
}
end;
Decision coverage = (number of decision outcomes executed )/total outcomes *100
Based on the flowchart The decision coverage is 71 %
Flowchart:
In order to get 100 % coverage the below are the testcases to include.
Testcase 1: A=22 and B =10
Testcase 2: A=15 and B=5
These two test cases are for both positive and negative cases which covers 100 % decision.
(3 points) How many integer solutions of + +33 +34 = 30 are there with I, > 0, 2 <5, 12 <11, 13 < 13, 14 < 23?
PYTHON PROGRAMMING: DO NOT USE INPUT FUNCTION, use sys.argv Write a program that generates two random integer numbers between 1 and 100. Then, print out the numbers between the two randomly generated ones using a while loop. The output is shown below. Output: a) start:4, end:14 4 5 6 7 8 9 10 11 12 13 14 b) start:15, end:20 15 16 17 18 19 20
Please write answers clear. I will leave like if its
correct.
Age
Gen
Sibs
Work
Exercise
Units
Mom
18
M
1
20
10
15
6
17
F
3
0
7
15
14
23
M
3
20
5
13
8
20
M
2
0
5
15
16
18
F
4
22
6
16
9
20
F
2
11
7
20
20
34
F
1
48
10
10
18
22
F
3
37
13
13
18
19
M
3
0
18
14...
2 3 S1 0 1 0 114 4 13 1 0 15 7 2 4 1 14 3|15 12 8 4 5 6 7 8 9 10 11 12 13 14 15 1 2 15 11 8 3 10 6 12 5 9 0 7 4 14 2 13 1 10 6 12 11 9 5 3 8 8 13 6 2 11 15 12 9 7 3 10 5 0 2 4 9 1 7 5 11 0 6...
Question 2 (a) Define algorithm and give an example to illustrate it. [5 marks] (b) The following C program codes are given below 1.#include <stdio.h> 2. main() char s 1-"Bad"; 6 7 char s1 -"weather!"; char sen [20]; int i, ji for (i-0;i<20: ++i) 10. sen [i]-s [i]; else 12. 13. 14. 15. 16. 17 18. 19 sen [i++ for ( j-o;s1 [j] !-'\0 ' ; j ++ , i++) sen [i]-s1 [j break; 20. 21 22. sen [il-'1o puts...
please determine the output in a simple form
#include <stdio.h> 2 3 //Item 02 4 int main() 5 6 7 8 9 10 int i for( i = 0 ; i < 5 ; i++ ) ifo 12 13 14 15 16 17 18 19 20 21 printf("A" printf("B"); if i > 2 ) printf("C"); 23 24 25 26 27 28 29 30 31 32 if( i 3) printf( "D") if>4) printf("E 34 35 36 37 38 39 40 41...
MATLAB
Test Cases:
% [area1] = integrals(int1, int2)
int1 =
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40
int2 =
Columns 1 through 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14
3 6 9 12 15 18 21 24 27 30...
Output MWTP MC 1 20 5 2 18 6 3 16 7 4 14 8 5 12 9 6 10 11 7 8 15 8 6 21 9 4 30 10 2 40 1. The values for MWTP and MC are given belohli a. Graph these curves and find equilibrium. b. label consumer and producer surplus. c. Show that any other level [Q] the net social bei!!! Why?
Draw the residual network for the following flow 1/13 15/1 18/29 7/ 0/9 4/6 8/10 0/2 4/4 1/5 0/14 0/4 8/30 7/16 9/2 V3 V8
Draw the residual network for the following flow 1/13 15/1 18/29 7/ 0/9 4/6 8/10 0/2 4/4 1/5 0/14 0/4 8/30 7/16 9/2 V3 V8
select the correct answer
What will be the output at line 13? 1 #include <iostream> 2 using namespace std; 5 int main() 6 int k-4; 8 for(int j-3; j<3+11; j++) 92 { 10 k-k+3; 11 12 13 cout<<k3 14 15 return; 16 7 Select one: A. 44 B. 23 C. 26 D. 27