/* A sample program file: 1ex1.cpp ( or used as 1ex1.appended) FALL 1998 ___________________________________ Jacob Y. Kazakia jyk0 July 14, 1998 Programming assignment 1 of week 1 Recitation Instructor: J.Y.Kazakia Recitation Section 01 ___________________________________ Purpose: This program calculates the area of a sector of circle, given the radius of the circle in meters and the angle of the sector in degrees. Algorithm: The area of the entire circle is given by the formula: Area = pi * radius * radius ( here pi = 3.1415927 ) If the sector angle is theta degrees, then its area is: Sector_area = ( theta / 360 ) * pi * radius * radius */ include // header which contains the functions // needed for input and output const float PI = 3.1415927; // No one should be allowed to alter // this important constant void main() { // variables are typed and defined float radius; // the value of the radius of the circle (meters) float theta; // the angle of the sector (degrees) float area; // the area of the sector (square meters) // prompt for and read the radius cout<< endl<<"Enter the radius of the circle (in meters) >>>"; cin>>radius; // prompt for and read the sector angle cout<< endl<<"Enter the angle of the sector (in degrees) >>>"; cin>>theta; // Echo printing ( we must always double check ourselves and // others) cout<>hold; }