Sunday, June 21, 2020

URI Online Judge Solution 1002 - Brain Muscles URI 1002

Posted By: Naeem - June 21, 2020

Share

& Comment



URI Online Judge Solution 1002 - Brain Muscles URI 1002

URI Online Judge Solution 1002 ☺ Area of a Circle☺ URI Online Judge Solution 1002
Before seeing the solution make sure that you tried enough. Don’t paste the whole code, just find out the logic. If you stuck in trouble, just inform me on comment.


Add caption
 

URI 1002 Area of a Circle


URI Online Judge | 1002
Area of a Circle

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".
Samples Input

Samples Output
2.00

A=12.5664
100.64

A=31819.3103
150.00
A=70685.7750

URI Solution 1002 Extremely Basic in C:


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


About Naeem

Techism is an online Publication that complies Bizarre, Odd, Strange, Out of box facts about the stuff going around in the world which you may find hard to believe and understand. The Main Purpose of this site is to bring reality with a taste of entertainment

0 comments:

Post a Comment

URI 1010 Solution- Brain Muscles URI 1010 Solution In C

URI Online Judge Solution 1010 - Brain Muscles URI 1010 URI Online Judge Solution 1010☺ Simple Calculate☺ URI Online Judge Solution 101...

Copyright © Brain Muscles™ is a registered trademark.

Designed by Templateism. Hosted on Blogger Platform.