Advertisement
sofianights

Untitled

Jun 8th, 2019
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6.     double radius;
  7.     cin >> radius;
  8.  
  9.     double area = 3.14159265358979323846 * radius * radius;
  10.     double perimeter = 2 * 3.14159265358979323846 * radius;
  11.  
  12.     cout.setf(ios::fixed);
  13.     cout.precision(2);
  14.     cout << area << endl;
  15.     cout << perimeter << endl;
  16.  
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement