Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main()
- {
- double A, n=3.14159, R;
- cin >> R;
- A = n * R * R;
- cout << "A=" << fixed <<setprecision(4) << A << endl; //setting 4 digits after decimal point. needs "iomanip"
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement