Translate the program into three-address statements of the


Figure is code to count the number of primes from 2 to n, using the sieve method on a suitably large array a. That is, a[i] is TRUE at the end only if there is no prime p i or less that evenly divides i. We initialize all a[i] to TRUE and then set a[j] to FALSE if we find a divisor of j.

a) Translate the program into three-address statements of the type we have been using in this section. Assume integers require 4 bytes.

b) Construct the ow graph for your code from (a).

c) Identify the loops in your ow graph from (b).

1760_Program.jpg

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Translate the program into three-address statements of the
Reference No:- TGS01718620

Expected delivery within 24 Hours