GRANNY QUILT COSTS
Grannies for Peace want to sew a giant quilted Peace Symbol to display on International Peace Day. Their design calls for a large circle of quilted fabric, buttons to attach for the peace symbol, and fringe around the outside of the circle. They are trying to determine how large a circle they can build and stay within their budget. Their costs are the cost of fabric, buttons, and fringe. They have decided on what buttons they want to use, which are one inch in diameter and cost two cents each. They will need enough buttons for a length of four times the radius. They have decided on what fringe they want to use, which cost twenty cents per foot. They will need enough fringe to ring the circumference of the circle. The unknowns in their computation are the diameter of the circle, the cost of fabric, and the number of people who will be sewing. Write a program to assist with their computations, as specified below.
2.0 INPUT REQUIREMENTS
2.1 Diameter of a circle, in feet. (integer)
2.2 Fabric cost per square foot, in cents (integer)
2.3 The number of people that will be sewing the quilt. (integer).
of the circle (displayed with two decimal
places. Use a placeholder of %.2f).
3.2 Circumference of the circle (displayed with two decimal places.)
4.0 FUNCTIONAL REQUIREMENTS
4.1 Obtain the circle diameter, fabric unit cost, and number of people from the user.
4.2 Compute the circle area, using the formulas:
Radius = diameter / 2
= Pi * radius * radius
= Pi * 2 * radius
4.3 Compute the total cost which includes fabric, button, and fringe costs.
Total cost = (Fabric unit cost * area) + (cost of one button * 12 * (Radius * 4)) + ( Fringe cost per foot * Circumference).
4.5 Compute the fraction of the total cost that each person should pay.
4.7 Display the results: area, circumference, total cost, and cost per person.
cost and Fringe cost must be coded as constants.
Diameter, fabric cost, and number of people must be coded as integer variables.
Input data will contain no characters.
Input data will contain only positive numbers.
Only integer values will be entered for integer variables.
Pi is 3.141593 since float has only six significant
(Values shown below in bold face are data entered by the user).