#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

#### Categories

Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

# subject area of cirlce.

Posts: 13Member
what is meaning of double-precision in the following question?
[blue]
Write a function that returns the double-precision area of a circle, given the double precision radius passed to it. The formula to calculate the radius of a circle is .

what will be the value of radius.? [/blue]

and what will be the value of radius in above question?
Talha Nasir

· ·

• Posts: 765Member ✭✭✭
: what is meaning of double-precision in the following question?
: [blue]
: Write a function that returns the double-precision area of a circle, given the double precision radius passed to it. The formula to calculate the radius of a circle is .
:
:
: what will be the value of radius.? [/blue]
:
: and what will be the value of radius in above question?
: Talha Nasir
:
:

[green]Use [italic]double[/italic] variables as opposed to [italic]float[/italic] for [italic]radius[/italic] and [italic]area[/italic]. How the heck do I know what the value of radius is going to be? I'm not clairvoyant/omniscient.[/green]
· ·
• Posts: 1,784Member
: : what is meaning of double-precision in the following question?
: : [blue]
: : Write a function that returns the double-precision area of a circle, given the double precision radius passed to it. The formula to calculate the radius of a circle is .
: :
: :
: : what will be the value of radius.? [/blue]
: :
: : and what will be the value of radius in above question?
: : Talha Nasir
: :
: :
: How the heck do I know what the value of radius is going to be? I'm not clairvoyant/omniscient.[/green]
:
With some math it should be:
· ·
• Posts: 78Member
That should be exactly what you need:[CODE]double AreaOfCircle(double radius)
{
}[/CODE]

: what is meaning of double-precision in the following question?
: [blue]
: Write a function that returns the double-precision area of a circle, given the double precision radius passed to it. The formula to calculate the radius of a circle is .
:
:
: what will be the value of radius.? [/blue]
:
: and what will be the value of radius in above question?
: Talha Nasir
:
:
· ·
• Posts: 64Member
: That should be exactly what you need:[CODE]double AreaOfCircle(double radius)
: {