**Programming Team: Practice Contest,
21-Jan-05**

*Mt Lebanon HS 2004-5
David Kosbie*

**Link to the Programming
Team Home Page.**

**Q1:** Read in three doubles: x1, x2, and
y2, followed by an integer n. The doubles represent triangle T_{1}
which has vertices at (0,0), (x1,0), and (x2,y2). Triangle T_{2 }
is formed by connecting the midpoints of the sides of triangle T_{1},
and in general, triangle T_{k+1 }is formed by connecting the midpoints
of the sides of triangle T_{k}. Print out the perimeter of
triangle T_{n}.**
Q2: ** Read in a positive integer n1 followed by a positive integer n2,
where n2 > n1. Print out the number of prime numbers in the range [n1,n2].
Note: your program must run in under 1 second when n1=0 and n2 = 1
million.

Q3:

Q4: