Posted by Md. Hanif Ali Sohag on Monday, June 27, 2016 in URI Contest Programming | No comments

URI Online Judge | 1002

# Area of a Circle

Adapted by Neilor Tonin, URI Brazil

**Timelimit: 1**
The formula to calculate the area of a circumference is defined as

Calculate the area using the formula given in the problem description.

**A = π . R**. Considering to this problem that^{2}**π**=**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 |

## Solution

#include<stdio.h> int main() { double R,A; scanf("%lf", &R); A = 3.14159*R*R; printf("A=%.4lf\n", A); return 0; }

## 0 comments:

## Post a Comment