Program P4.c -- tcov Output

           #include <stdio.h>
           #include <math.h>
           
           int root( int n ) {
  26665 ->     return sqrt(n);
           }
           
           int prime( int n ) {
               int i, bound;
  99999 ->     if (n % 2 == 0)
  50000 -> 	return n == 2;
  49999 ->     if (n % 3 == 0)
  16667 -> 	return n == 3;
  33332 ->     if (n % 5 == 0)
   6667 -> 	return n == 5;
  26665 ->     bound = root(n);
               for( i = 7;  i < bound;  i += 2 )
1257266 -> 	if (n % i == 0)
  16996 -> 	    return 0;
1240270 ->     return 1;
           }
           
           int main() {
               int i, n;
      1 ->     n = 100000;
               for( i = 2;  i <= n;  i++ )
  99999 -> 	if (prime(i))
   9672 -> 	    printf("%d\n", i);
  99999 ->     return 0;
           }


		 Top 10 Blocks

		 Line	   Count

		   18	 1257266
		   20	 1240270
		   10	   99999
		   27	   99999
		   29	   99999
		   11	   50000
		   12	   49999
		   14	   33332
		    5	   26665
		   16	   26665


	   15	Basic blocks in this file
	   15	Basic blocks executed
	100.00	Percent of the file executed

      3034197	Total basic block executions
     202279.80	Average executions per basic block