Assignment:
Write a C++ program that defines a global constant named PI with a value of 3.14159 and local variables for radius, with a value of 6, and diameter, with a value of 12. Then, calculate the area and circumference of a circle, using each of the equations found in the attached document, and store the results in variables named areaR, circumferenceR, areaD, and circumferenceD. You will need to include math.h and pow() to compute the square of a value. Make sure that you display all results to the screen.
// This assignment confuses me.. why would there be two different values for
// each area and circumference when radius and diameter are describing just
// one circle? so you can figure out what to do with those other two variables.
The instructions call for the use of 4 variables, areaR and circumfrenceR, and areaD and circumfrenceD. This means that you need to use both radius and diameter when calculating your variables.
so that should give you the same value for areaR and areaD, and the same for circumferenceR and circumferenceD.. seems to me it'd be best to pick one and stick with it lol but if that's what ya gotta do..
"\n" never killed anyone and neither has cmath to my knowledge, limited as it is