Unformatted text preview: distance to its destination. Write a program that uses a do loop to find out how many burns are required to get from Earth to within 1 meter of Mars and what that final distance is. - Use 58,000,000 km as the distance from Earth to Mars. - Use double precision variables except for the loop counter. - Your program should compile in Force 2.0 with no errors or warnings. - The correct answer is 87 burns and 0.782993053 m. This should be written to the screen exactly as: The number of burns is 87. The final distance between the ship and Mars is 0.782993053 m. Save this file as YourLastNameHW2.f and email it to me at [email protected] . Pay attention to units. Yes, you must put the period after the 87 and the m when writing the output to the screen. Answer the syntax questions above in the same file as comments before your code begins. No late work will be accepted....
View Full Document
- Spring '11
- Control flow, Imperative programming, syntax questions