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.
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
Get step-by-step solutions from verified subject matter experts
