Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- const double MY_PI = 3.14159265;
- double radius;
- cout << "Program calculates the area and circumference of a circle" << endl;
- cout << "enter circle radius" << endl;
- cin >> radius;
- double area = MY_PI*(radius*radius);
- double circumference = 2*MY_PI*radius;
- //these are the lines with errors
- double AREA_STR = "Area of circle with radius " + radius + " is " + area;
- double CIRCUM_STR = "Circumference of a circle with radius " + radius + " is " + circumference;
- cout << AREA_STR << endl;
- cout << CIRCUM_STR << endl;
- return 0;
Add Comment
Please, Sign In to add comment