#include #include using namespace std; int main() { double light_minute; double distance; double elapse; int minute; int second; // 12 // light year 9.46 * 10 // // i.e. 9.46 * 10 to the power 12 const double light_year=9.46*pow(10.0,12); light_minute=light_year/(365.25*24.0*60.0); distance = 150.0 * pow(10.0,6); elapse = distance/light_minute; minute = elapse; second = (elapse-minute)*60; cout << " Light takes " << minute << " minutes" << endl; cout << " " << second << " seconds" << endl; cout << " to reach the earth from the sun." << endl; return(0); }