Header Ads Widget

Responsive Advertisement

Trace Table on For Loop By Data Input Part - 2

 



1.For M4 = 1 to 4

2.Input M1

3.Input M2

4.M3 = m1 + m2

5.Print M3

6.Next

Make a trace table for this program using 6&4, 5&7, 13&15, -1&-1:

Line

M4

M4= 1to 4

M1

M2

M3

Output

1

1

Yes

 

 

 

 

2

 

 

6

 

 

 

3

 

 

 

4

 

 

4

 

 

 

 

10

 

5

 

 

 

 

 

10

1

2

Yes

 

 

 

 

2

 

 

5

 

 

 

3

 

 

 

7

 

 

4

 

 

 

 

12

 

5

 

 

 

 

 

12

1

3

Yes

 

 

 

 

2

 

 

13

 

 

 

3

 

 

 

15

 

 

4

 

 

 

 

28

 

5

 

 

 

 

 

28

1

4

Yes

 

 

 

 

2

 

 

-1

 

 

 

3

 

 

 

-1

 

 

4

 

 

 

 

-2

 

5

 

 

 

 

 

-2

1

5

No

 

 

 

 

 

 

 

STOP

 

 

 





Post a Comment

1 Comments