Question: C++ Problem 4 In astronomy, luminosity is the total amount of energy emitted per unit of time by a star, galaxy, or other astronomical object.

C++
 C++ Problem 4 In astronomy, luminosity is the total amount of

Problem 4 In astronomy, luminosity is the total amount of energy emitted per unit of time by a star, galaxy, or other astronomical object. We can calculate the luminosity, L, of a star using its apparent brightness, b (how bright it looks from earth), and the star's distance from the observer, d, using the formula: Write a function luminosity that implements this formula. Your function MUST be named luminosity Your function should accept two input arguments: brightness and distance, as doubles Your function should return the value of the luminosity as an int (you will have to cast it to an integer value) Your function should not print/display/output anything . For t use the value 3.14159 For example, given initial values of: b -1.5 and d 17.8, your function would return 5972

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!