Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- //Initializes the main function
- int main()
- {
- double rad{0.0};
- double circ{0.0};
- double diam{0.0};
- double area{0.0};
- double pi{3.14159};
- cout << "Radius? " << endl;
- cin >> rad;
- //Defining the variables
- circ = 2 * pi * rad;
- diam = 2 * rad;
- area = pi * (rad * rad);
- //Output for the user
- cout << "Circumference is " << circ << endl;
- cout << "Diameter is " << diam << endl;
- cout << "Area is " << area << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement