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 CalculateWeight
- {
- static void Main()
- {
- Console.Write("Human Weight = ");
- double humanWeight = double.Parse(Console.ReadLine());
- Console.WriteLine("Gravitational field = 17 %");
- double weightMoon = humanWeight * 0.17;
- Console.Write("weight of a man on the moon = ");
- Console.WriteLine(weightMoon);
- }
- }
Add Comment
Please, Sign In to add comment