uri online judge solve
The formula to calculate the area of a circumference is defined as A = π . R2. Considering to this problem that π = 3.14159:
Calculate the area using the formula given in the problem description.
Input
The input contains a value of floating point (double precision), that is the variable R.
Output
Present the message “A=” followed by the value of the variable, as in the example bellow, with four places after the decimal point. Use all double precision variables. Like all the problems, don’t forget to print the end of line after the result, otherwise you will receive “Presentation Error”.
Input Samples | Output Samples |
2.00 | A=12.5664 |
100.64 | A=31819.3103 |
150.00 | A=70685.7750 |
———Solve———
#include <stdio.h>
#define pi 3.14159
int main()
{
double A,R;
while(scanf("%lf",&R)==1)
{
A = pi * R * R;
printf("A=%.4f\n",A);
}
return 0;
}
- How to Use URI Online Judge to Improve Your Coding Skills and Boost Your Career
- BEST FREE GIFT CARD GENERATOR in 2022
- উইন্ডোজ 11 এসে গেল, নজরকাড়া লুক, তাক লাগানো ফিচার্স!
- URI 2694 Solved by C programming
- URI Online Solve | 1957 Converting to Hexadecimal- Solution
- Android custom toolbar Android Studio | Android Tutorial
- URI Online Judge | 1040 Solution | Average 3
- URI Online Judge | 1038 Solution |Snack
- URI Online Judge | 1037 Solution | Interval
- URI Online Judge | 1036 Solution | Bhaskara’s Formula
- URI Online Judge Solution| 1035 Selection Test 1
- URI Online Judge Solution| 1021 Banknotes and Coins
- URI Online Judge Solution| 1020 Age in Days
- URI Online Judge Solution| 1019 Time Conversion
- URI Online Judge Solution| 1018 Banknotes