In what concerns the continuous evaluation solving exercises grade during the semester, you should submit until 23:59 of October 19th
(this exercise will still be available for submission after that deadline, but without couting towards your grade)
[to understand the context of this problem, you should read the class #02 exercise sheet]
The fast food industry is shaking things up!
McDonald's has changed their classic circular burgers to square-shaped ones.
Are you eating less burger for the same price?
Write a program that, given the diameter D of a circular burger, calculates the side length A of a square burger that has the same surface area. Use pi as 3.14159 for your calculations. Round the side length A to three decimal places.
A line containing single floating-point number D representing the diameter of the circular burger.
The output should be a single line displaying the side length A of the square burger, rounded to three decimal places.
The following limits are guaranteed in all the test cases that will be given to your program:
0 < D < 1000 | The diameter of a circular burger |
Example Input 1 | Example Output 1 |
8.89 |
7.879 |
Example Input 2 | Example Output 2 |
7.62 |
6.753 |