Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //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.
- using System;
- class GravityMoon
- {
- static void Main()
- {
- Console.Write("Write weight of a man on Earth: ");
- string man = Console.ReadLine();
- double weightMan = double.Parse(man);
- double wMoon = ((double) (weightMan * 17)) / 100;
- Console.WriteLine(wMoon);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement