Conside the following program fragment.
(1) for i=1 to n do
(2) M = 0
Let A represent the initialzation (i=1) in line (1); let B represent the "body" of the loop; ie., line(2) Let I represent the incrementation of i by 1 implied by line (1), and Let T represent the test for i<=n also impied by line (1).
Which of the following regular expressions represents all possible sequences of steps taken duting execution the fragment, if it is assumed that n is arbitrary and that no abnormal terminations of the loop can occur?
(A) AT(BIT)* (B) A(ITB)*T (C) AT*B*I*T (D) (ABIT)* (E) A(TBI)*
答案是A.但不知道是为什么? 能不能帮忙做一下谢谢.:)