Question: Below is pseudocode that involves some basic astronomical calculations. Your task is to translate this pseudocode into a Java program. 1 . Declare a variable
Below is pseudocode that involves some basic astronomical
calculations. Your task is to translate this pseudocode into a Java program.
Declare a variable to store the number of stars visible in the Milky Way
galaxy with the naked eye and assign it the value
Declare a variable to store the approximate number of stars in the Milky
Way galaxy and assign it the value
Declare a variable to store the distance from Earth to the nearest star
Proxima Centauri in lightyears and assign it the value
Declare a variable to store the result of multiplying the number of
visible stars by the distance to Proxima Centauri.
Declare a variable to store the result of dividing the total number of
stars in the Milky Way by the number of visible stars.
Declare a variable to store the result of adding the distance to Proxima
Centauri, the number of visible stars, and the total number of stars in the
Milky Way.
Print the results for the multiplication, division, and sum.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
