i'm currently taking a matlab course. i've never used matlab before, so it's very new to me.
we had an in-class assignment today, that we didn't have time to finish, but i am stuck.
we have information that Pluto is 4.34 billion km from earth. we have a spacecraft that travels at 5.2 km.sec
the spacecraft also consumes 0.078 liters/hour
will it have enough fuel to reach pluto?
that is the assignment basically. here is what i have done so far:
distance = input('How far away is Pluto in km? ');
fuel = input('How much fuel in liters does the spacecraft have? ');
speed = input('How fast does it go? ');
disp(sprintf('Pluto is %5.2f km away from the Earth.', distance));
disp(sprintf('The spacrecraft has %5.2f liters of fuel,' fuel));
am i doing this right? any help will be greatly appreciated
thanks in advance
we had an in-class assignment today, that we didn't have time to finish, but i am stuck.
we have information that Pluto is 4.34 billion km from earth. we have a spacecraft that travels at 5.2 km.sec
the spacecraft also consumes 0.078 liters/hour
will it have enough fuel to reach pluto?
that is the assignment basically. here is what i have done so far:
distance = input('How far away is Pluto in km? ');
fuel = input('How much fuel in liters does the spacecraft have? ');
speed = input('How fast does it go? ');
disp(sprintf('Pluto is %5.2f km away from the Earth.', distance));
disp(sprintf('The spacrecraft has %5.2f liters of fuel,' fuel));
am i doing this right? any help will be greatly appreciated
thanks in advance