Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- /*The gravitational field of the Moon is approximately 17%
- *of that on the Earth. Write a program that calculates the weight of a man
- * on the moon by a given weight on the Earth
- */
- class MoonGravity
- {
- static void Main()
- {
- Console.WriteLine("Please enter your weight in kg");
- float weight = float.Parse(Console.ReadLine());
- float moonWeight = weight * 0.17f;
- Console.WriteLine("Your weight on the Moon will be {0} kg",moonWeight);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment