0016 --- calculate the circumference and area of the circle

Source: Internet
Author: User

Calculate the circumference and area of the circle
Difficulty level: A; running time limit: 1000 ms; running space limit: KB; code length limit: B
Question description
Enter a positive number to indicate the radius of a circle, and calculate and output the circumference and area of the circle.
Input
A positive number (which may have a decimal point)
Output
Two positive numbers separated by a space, representing the circumference and area of the circle respectively
Input example
2.5
Output example
15.708 19.6349
Other Instructions
The number of inputs cannot exceed 1000, and the circumference rate is 3.14159.

This question is still a set of formulas. You do not need to add more BB codes directly.

Pay attention to the question of π, just take 3.14159.

The Code is as follows:

# Include <iostream> # include <cmath> using namespace STD; int main () {double A, B, C; CIN> A; B = 2 * a * 3.14159; C = A * a * 3.14159; cout <B <"" <C <Endl; return 0 ;}

0016 --- calculate the circumference and area of the circle

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.