Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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++
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Build It For The Real World A Database Workbook

Authors: Wilson, Susan, Hoferek, Mary J.

1st Edition

0073197599, 9780073197593

More Books

Students also viewed these Databases questions

Question

6. The cost of the training creates a need to show that it works.

Answered: 1 week ago