jzxx 1001 Given the radius of a circle, find the area and perimeter of the circle.

Topic description

Given the radius of a circle, find the area and perimeter of the circle .

enter

The input has only one line and only one integer, which is the radius of the circle .

output

The output has only two lines, one for area and one for perimeter. (with two decimal places)

sample input 

1

Sample output 

3.14 6.28

program

1.#include<bits/stdc++.h>
2.using namespace std;
3.int main()
4. {
5.   double a,b=0,c=0;
6.   cin>>a;
7.   b=a*a*3.14;           
8.   c=a*2*3.14;
9.   cout<<fixed<<setprecision(2)<<b<<' '<<c;
10.  return 0;
11.}







Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324810775&siteId=291194637