// C++ program to calculate the mass of an object in a planet
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;
int main() {
string name;
double mPlanet,dPlanet,rPlanet,mObject;
cout<<"\t\tComputing Weights of objects on different Planets"<<endl;
cout<<"********************************************************************************"<<endl<<endl;
// inputs
cout<<" Please enter the name of planet : ";
cin>>name;
cout<<" Enter the mass of Planet(M) : ";
cin>>mPlanet;
cout<<" Enter the diameter of Planet : ";
cin>>dPlanet;
cout<<" Enter the mass of an object(m) : ";
cin>>mObject;
const double g = 6.673e-11; // gravitational constant
rPlanet = dPlanet/2; // calculate the radius of planet
// calculate gravity of planet
double fg = g*mPlanet/(rPlanet*rPlanet);
// calculate weight of object in planet
double w = fg*mObject;
// output
cout<<endl<<" "<<left<<setw(20)<<"Planet"<<left<<setw(20)<<"Gravity m/s"<<left<<"Weight of Object Kgs"<<endl;
cout<<" "<<left<<setw(20)<<"******"<<left<<setw(20)<<"*******"<<left<<"*********************"<<endl;
cout<<" "<<left<<setw(20)<<name<<left<<setw(20)<<fixed<<setprecision(1)<<fg<<left<<setprecision(3)<<w<<endl;
return 0;
}
//end of program
Output:
Note: It should be the same in figure2 (Yellow Page). roblem find the weight of an...
Please explain step by step! Useful Planetary Data Mean Radius (m) 243 × 106 6.06 × 10° 6.38 × 10° 3.37 × 106 6.99×107 5.85 × 10' 2.33 × 107 221 × 107 1.14 × 10° 1.74 × 10° 696 × 108 Period (s) 7.60 × 106 1.94 × 107 3.156 × 10, 5.94 × 10' 3.74 × 108 9.35 × 108 2.64 × 109 5.22 × 109 782 × 109 Mean Distance from Sun (m) 579 × 100 1.08...
I want to have a code that can pick whichever two planets in the solar system and find the distance of them no matter where in their orbit they are, but I keep getting errors. Can someone please help me fix it? f rom scipy import exp, pi, absolute, linspace import matplotlib. Ryplot as plt planet-I input ('Which planet do you want to pick for planet 1?") planet_2 input ('which planet do you want to pick for planet 27') distance...
Page 3 of 6 10. Which of the following is correct? a) The rotation axes of planets are always perpendicular to their orbital plane (the ecliptic). b) No planet's orbital inclination is more than 20 degrees from the ecliptic. c) Planets orbits are circular. d) Planets always rotate and revolve in the same direction. 11. Which of the following is not a real difference between asteroids and comets? a) Asteroids are made mostly of rock and comets are made mostly...
VISUAL STUDIO - WINDOWS FORM APP (C#) - PLEASE MAKE SURE TO SHOW ALL CODE & ANSWER/FOLLOW ALL THE QUESTIONS IN THE ASSIGNMENT! Planet Info Help When planning this project, review the concept of accessing object properties on another form. Form2.IblMessage.Text = "1122.25" or you can put a string or object instead of numbers You can then create one form for the Planets information and set all the properties before you display the Planet Form For the pictures of the...
l T-Mobile 9:15 AM a webassign.net Astrology, that unlikely and vague pseudoscience, makes much of the position of the planets at the moment of one's birth. The only known force a planet exerts on Earth is gravitational. Calculate the magnitude of the gravitational force (in N) exerted on a 3.00 kg baby by a 130 kg father 0.250 m away at birth (he is assisting, so he is close to the child.) ) Calculate the magnitude of the force on...
need answer ASAP. Do not know how to caculate answers. Q4. Because of your physics skills you have been selected to scout locations for the first movie to be shot or another planet. However while there an alien sneaks up behind you and hits you on the head. When you wake up you cannot remember what planet you are on, but you do have a table of gravitational acceleration on the different planets and a ball you can throw. Use...
Mm 9x Weight of an object on the X-planet surface Weight W = F = mgx G = 6.67 x 10-11 Gravitational acceleration on a X-planet EX-8 In a 2014 epic science fiction movie, Interstellar, a small group of astronauts travel through a wormhole near Saturn in search of a new home for humanity. In the film the astronauts are even able to close a black hole (mass is very large) called Gargantua. Now assume these astronauts are landed at...
ars nly shrank to a tenth mass What would o the Sun? d sphere to a and mass How where G-untversal gravitational constant: G-6.67x101 N k m-3 kg- the mass of the baby M-either the mass of Mars or the obstetrician, and r-the separation between the baby and either Mars or the doctor at the instant of birth th bored from one of the Earth, and seball down this e surface What Questions 1. Calculate Fr. the force on the...
If the mass of the Earth increased without any change in its radius your weight would increase decrease stay the same The value of acceleration due to gravity. O depends on the radius of Earth O depends on the mass of the Earth B. O depends on the universal gravitational constant, G o is different on different planets all of the above Which is true: the gravitational potential energy of an object in Earth's orbit depends on the radius of...
A synchronous satellite, which always remains above the same point on a planet's equator, is put in orbit around Mars so that scientists can study a surface feature. Mars rotates once every 24.6 h. Use the data of this table to find the altitude of the satellite. Please show how you figured this out step by step! Useful Planetary Data Mean 10-19 ..3 Mean Distance Radius (m Mass (kg) Period (s) Body from Sun (m) 2.48 X 10 7.60 x...