URI ONLINE JUDGE SOLUTION 1002 - Area of a Circle
Problem:
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.
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".
Solution:
#include<stdio.h>
#define pi 3.14159
int main()
{
double R,A;
scanf("%lf",&R);
A=pi*R*R;
printf("A=%0.4lf\n",A);
return 0;
}
Solution:
#include<stdio.h>
#define pi 3.14159
int main()
{
double R,A;
scanf("%lf",&R);
A=pi*R*R;
printf("A=%0.4lf\n",A);
return 0;
}
Oeridtincfu Kristy Jones Download
ReplyDeleteciibithemer
iremmo-mi-1988 Nick Alvarado Avast Cleanup
ReplyDeleteInternet Download Manager
AAct Portable 4.2.7
Any Video Converter
odachebin