Welcome to CSC200 Lab 5
Write a C++ program that prompts the user to enter the percentage of the moon's face that appear's illustrated, and outputs the the surface area of that portion of the moon. The formula for the surface area of a segment is
where
is the raduis of the sphere (the moon's raduis is
km) and
is angle of the wedge in radians. There are
radians in a circle so the hemisphere we see accounts for at most
radians. Thus, if the user enters 100% (full moon), the angle of the wedge is
and the formula is
If the user enters 50%, the angle of the wedge is
and so on. Use doubles for your calculation and limit the decimal precision to 5 places. You will need the cmath, iostream and iomanip header files.